diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshExporterDivided.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshExporterDivided.cs index 2426d2bf2..93286beb8 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshExporterDivided.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshExporterDivided.cs @@ -38,6 +38,7 @@ namespace UniGLTF for (int i = 0; i < mesh.subMeshCount; ++i) { var indices = mesh.GetIndices(i); + var hash = new HashSet(indices); // mesh // index の順に attributes を蓄える @@ -45,7 +46,7 @@ namespace UniGLTF usedIndices.Clear(); for (int k = 0; k < positions.Length; ++k) { - if (indices.Contains(k)) + if (hash.Contains(k)) { // indices から参照される頂点だけを蓄える usedIndices.Add(k);