From df6c6dbf0efb12cc917c8ec10419a73f3093bc44 Mon Sep 17 00:00:00 2001 From: pfcDorn Date: Thu, 18 Jan 2024 13:44:17 +0100 Subject: [PATCH] bone import fix --- Runtime/Scripts/SceneImporter/ImporterMeshes.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Scripts/SceneImporter/ImporterMeshes.cs b/Runtime/Scripts/SceneImporter/ImporterMeshes.cs index d179c21f5..7aa0e0d6b 100644 --- a/Runtime/Scripts/SceneImporter/ImporterMeshes.cs +++ b/Runtime/Scripts/SceneImporter/ImporterMeshes.cs @@ -368,7 +368,7 @@ protected async Task ConstructUnityMesh(GLTFMesh gltfMesh, DecodeResult[] decode // Custom combine all boneweights and bonePerVertex of sub meshes and apply to final combined mesh // >> Bug(?) in CombineMeshes that does not proper copy bone weights and bones per vertex NativeArray allBoneWeights = new NativeArray(boneWeightCount, Allocator.TempJob); - NativeArray allBonesPerVertex = new NativeArray(boneWeightCount, Allocator.TempJob); + NativeArray allBonesPerVertex = new NativeArray(bonesPerVertexCount, Allocator.TempJob); int currentArrayPositionBoneWeights = 0; int currentArrayPositionBpV = 0; for (int i = 0; i < subMeshes.Length; i++)