Error防止

Material doesn't have a float or range property '_VColBlendMode'
UnityEngine.Material:GetInt(String)
This commit is contained in:
ousttrue
2020-10-02 15:41:18 +09:00
parent fba303ffd7
commit ff00b88682

View File

@@ -64,7 +64,15 @@ namespace VRM
static bool MaterialUseVertexColor(Material m)
{
return UniGLTF.UniUnlit.Utils.GetVColBlendMode(m) == UniGLTF.UniUnlit.UniUnlitVertexColorBlendOp.Multiply;
if (m.shader.name != UniGLTF.UniUnlit.Utils.ShaderName)
{
return false;
}
if (UniGLTF.UniUnlit.Utils.GetVColBlendMode(m) != UniGLTF.UniUnlit.UniUnlitVertexColorBlendOp.Multiply)
{
return false;
}
return true;
}
public static void CalcMeshSize(ref UniGLTF.MeshExportInfo info,