Hi devs. I am making a game with customisable options, so characters can have alternative ‘skins’. The way I want to do this is by using one skinned mesh renderer for an armature, and simply swapping the mesh depending on the user’s choice. This is so I can keep animations across one object.
I’ve just created an alternative skin for a character in Blender (using the exact same armature as my default one) and imported it into Unity. However when I replace the mesh for my original model with my new mesh, it becomes distorted and looks like this:
One thing to note is when I have this new model as a completly seperate object (so I drag it into the hierarchy with its own armature and mesh) it works fine and isn’t distorted at all which makes me think it’s something I’ve done wrong in Unity rather than Blender.
I also can’t find anything about this and anything that could work simply doesn’t. I’ve been looking into this for the last 8 hours now so getting a little frustrated. If anyone understands what’s going on or needs extra details etc. I’d be happy to help! Thanks friends.
For anyone who might come across this issue or if you (@Sgt_Spike) haven’t solved this yet here is a possible cause and solution:
In blender when you create the original model, you probably (automatically) also assing weights to the model for that specific mesh-rig combination. When you then import the model into Unity and then assign a different mesh to the rig, you break the original mesh-rig weights, as the new mesh will be different from the original mesh and would need it’s own weights.
Since you already have multiple meshes but want to reuse your rig, I would recommend to create multiple models in Blender with the correctly assigned weights. Then in Unity you let users just swap the whole model, instead of assigning meshes to the rig. This way you can apply the same animation(s) to any of these models, since they all use the same rig.
Hope this helps someone out there.
I’m having this same exact issue, @dyark gives good insight into the cause, but the solution is not scalable and kind of defeats the purpose of why one would use one rig with multiple meshes.
Still searching for a solution to this problem…