Mecanim - swap Skinned Mesh Renderer

I have a character in my game and I want to swap the SkinnedMeshRenderer.sharedMesh during game.

I made 3 models and exported them from 3DsMax as FBX. (A,B and C)
They also only have one material per model.

In Unity the game character uses Model A and the other models Avatar Definition is copied from Model A.
Model B has the same polycount as Model A, works well and I can swap with no problem.
But the problem is with Model C, which has a different polycount, and when swapped, I get stretched polys.

But Model C seems fine, it has the same bone names, just a different polycount. Also if I import it by itself (without swapping the sharedMesh) it works properly.
It’s only when I swap the mesh from Model A that I get this issue.

Help very appreciated!

I need help with his as well as I have the exact same issue.

I have the same exact issue. Resurrecting this in hopes that someone can answer.

This is not a bug. You can’t just swap geometry, there are vertex weights to consider, which are dependent on vertex indices, which are different for different models.

To solve this would be to create a whole rigging transfer solution, which is beyond what Unity offers in general, so I don’t see it happening. You have that capability in most professional 3D apps which you use to author your 3d content.

There are two main options here:

  1. have all three models under a main object and turn off the ones you don’t want to be visible.

  2. make a scene in your 3d app, in which all 3 models are using the same skeleton, then you have 3 skinned mesh renderers, which you can enable and disable at will, it is similar to the first option, but you will only have one hierarchy, but you need to be able to author the new file, which might be out of scope for you (as it is out of scope for Unity to offer such tools).

I was having a similar issue, we were using the same rig for multiple skinned mesh uniforms that we planned on swapping during run-time.

I found out my bind setting settings in Maya had “Remove unused influences” turned on by default which from my experience leads to the exact issue in your screenshot. I’d recommend finding a similar setting in 3Ds Max and re-skinning the characters to see if it helps.

I hadn’t found anyone else mention this setting so I figured it might be worth it to make this post.

Hope this helps!