I think I have found out that Unity3D doesn’t add weightless bones to the bones array that is part of the object’s SkinnedMeshRenderer component. The complete skeletal structure appears perfectly fine as part of the hierarchy, but it’s not part of the bones array.
By weightless bone I mean a bone that does not affect any vertices.
This gets important when using shared meshes, like a piece of clothing that is rigged with the same bones inside the 3D modeling application and then cycles through all the wearer’s bones to assign it’s own ones to it… As in this method:
Any ideas how to deal with that issue (if it actually is one)?
The FBX exporter ignores unused bones when it comes to exporting teh vertex weights, so they show up as the hierarchy in Unity but are not added to the bones array of the SkinnedMeshRenderer component.
The solution:
Give the missing bones a keyframe and/or a weight (it’s enough if it’s just 0.01 for the single closest vertex).
I used to have the same issue when exporting rigged clothes from 3ds Max to fbx in Second Life. The workaround was to open up the FBX file with a text editor, locate the bones list, and add in the missing bone names and bone count manually.