Skip to content

Commit 7367337

Browse files
authored
Merge pull request #34 from Yellow-Dog-Man/frooxius/fix/fix-skinned-meshes-not-detected
Fix skinned meshes not being detected correctly in some cases
2 parents 87bcce5 + 51c97d4 commit 7367337

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)