From 94694b4186f3d5218f894d803793dac75c33beac Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 2 Oct 2020 16:52:45 +0900 Subject: [PATCH] skip color if [remove vcolor] --- Assets/VRM/UniVRM/Editor/Format/VRMExportMeshes.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/VRM/UniVRM/Editor/Format/VRMExportMeshes.cs b/Assets/VRM/UniVRM/Editor/Format/VRMExportMeshes.cs index bdc21b42c..eadb742b0 100644 --- a/Assets/VRM/UniVRM/Editor/Format/VRMExportMeshes.cs +++ b/Assets/VRM/UniVRM/Editor/Format/VRMExportMeshes.cs @@ -102,7 +102,8 @@ namespace VRM sb.Append("+UV"); info.ExportVertexSize += 4 * 2; } - if (info.Mesh.colors != null && info.Mesh.colors.Length == info.Mesh.vertexCount) + if (info.Mesh.colors != null && info.Mesh.colors.Length == info.Mesh.vertexCount + && info.VertexColor == UniGLTF.MeshExportInfo.VertexColorState.ExistsAndIsUsed) { sb.Append("+Col"); info.ExportVertexSize += 4 * 4;