From d5377d273caf595ac990b7f645ab7228ddd86932 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 15 Feb 2022 22:31:06 +0900 Subject: [PATCH] Merge pull request #1529 from Santarh/fixNewMeshApiError Fix NewMesh API error. --- Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs index 54bc2ba8b..9cfcd355c 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshContext.cs @@ -30,7 +30,7 @@ namespace UniGLTF public void UploadMeshVertices(Mesh mesh) { var vertexAttributeDescriptor = MeshVertex.GetVertexAttributeDescriptor(); - + // Weight情報等は存在しないパターンがあり、かつこの存在の有無によって内部的に条件分岐が走ってしまうため、 // Streamを分けて必要に応じてアップロードする if (_skinnedMeshVertices.Count > 0) @@ -428,6 +428,7 @@ namespace UniGLTF Profiler.BeginSample("MeshContext.DropUnusedVertices"); var maxIndex = _indices.Max(); Truncate(_vertices, maxIndex); + Truncate(_skinnedMeshVertices, maxIndex); foreach (var blendShape in _blendShapes) { Truncate(blendShape.Positions, maxIndex);