From 24941f759c0fbd3abea205d93d4c51d66c7b6c5b Mon Sep 17 00:00:00 2001 From: Sinematic3D Date: Tue, 3 Mar 2026 00:15:20 +0100 Subject: [PATCH 1/2] fix NullReferenceException when morph target accessor has no BufferView --- Runtime/Scripts/SceneImporter/ImporterMeshes.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Runtime/Scripts/SceneImporter/ImporterMeshes.cs b/Runtime/Scripts/SceneImporter/ImporterMeshes.cs index 4ca546240..020b4c4d2 100644 --- a/Runtime/Scripts/SceneImporter/ImporterMeshes.cs +++ b/Runtime/Scripts/SceneImporter/ImporterMeshes.cs @@ -824,6 +824,7 @@ protected virtual async Task ConstructMeshTargetsPrepareBuffers(MeshPrimitive pr BufferId bufferIdPair = null; if (targetAttribute.Value.Value.Sparse == null) { + if(targetAttribute.Value.Value == null) continue; bufferIdPair = targetAttribute.Value.Value.BufferView.Value.Buffer; } else From 5d45865d6104c0394fb6f5817b83ed77ac7eb4ff Mon Sep 17 00:00:00 2001 From: Sinematic3D Date: Tue, 3 Mar 2026 03:56:04 +0100 Subject: [PATCH 2/2] Actually implement fix I forgot to upload the right version ... Actually checking for null BufferView --- 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 020b4c4d2..db7cfae8e 100644 --- a/Runtime/Scripts/SceneImporter/ImporterMeshes.cs +++ b/Runtime/Scripts/SceneImporter/ImporterMeshes.cs @@ -824,7 +824,7 @@ protected virtual async Task ConstructMeshTargetsPrepareBuffers(MeshPrimitive pr BufferId bufferIdPair = null; if (targetAttribute.Value.Value.Sparse == null) { - if(targetAttribute.Value.Value == null) continue; + if(targetAttribute.Value.Value.BufferView == null) continue; bufferIdPair = targetAttribute.Value.Value.BufferView.Value.Buffer; } else