Skip to content

Commit 51c97d4

Browse files
committed
fix: Fix skinned meshes not being detected correctly in some cases
1 parent 87bcce5 commit 51c97d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assets/ResoniteSDK/Editor/AssetConverters/MeshConverter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ public static ResoniteLink.ImportMeshRawData ConvertMesh(UnityEngine.Mesh mesh)
127127
data.BlendShapes.Add(blendshape);
128128
}
129129

130-
data.BoneWeightCount = mesh.HasVertexAttribute(UnityEngine.Rendering.VertexAttribute.BlendWeight) ? 4 : 0;
130+
var hasBoneWeights = mesh.bindposeCount > 0;
131+
132+
data.BoneWeightCount = hasBoneWeights ? 4 : 0;
131133

132134
// Convert the vertex data
133135
data.AllocateBuffer();

0 commit comments

Comments
 (0)