From 51f508d8074f44f0b8c6b53327cb2813e6d590a5 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 13 May 2021 18:05:33 +0900 Subject: [PATCH] =?UTF-8?q?DIVIDE=5FVERTEX=5FBUFFER=E3=80=80=E3=81=8C?= =?UTF-8?q?=E3=81=99=E3=81=94=E3=81=84=E9=81=85=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/UniGLTF/Runtime/UniGLTF/IO/MeshExporterDivided.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);