Merge pull request #2495 from ousttrue/fix/skip_no_triangles_topology

[export][mesh] 三角形メッシュじゃない場合にスキップする
This commit is contained in:
ousttrue 2024-11-11 15:03:28 +09:00 committed by GitHub
commit bd3acb2cf1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,12 +266,6 @@ namespace UniGLTF
}
}
static bool TryGetMeshInfo()
{
return true;
}
public void CalcMeshSize(
GameObject root,
Renderer renderer,
@ -423,10 +417,19 @@ namespace UniGLTF
}
var info = new MeshExportInfo(renderer, settings);
if (info.Mesh != null)
if (info.Mesh == null)
{
m_list.Add(info);
continue;
}
for (int i = 0; i < info.Mesh.subMeshCount; ++i)
{
if (info.Mesh.GetTopology(i) != MeshTopology.Triangles)
{
continue;
}
}
m_list.Add(info);
}
}
}