How do you change which bone structure instance a skinned mesh uses?

My characters mesh is split up into several different skinned meshes (such as legs, feet, torso). Because of this, I would like to instantiate body parts when needed rather than on the initial character creation, since there are tons of variations. Also, when I’m testing skinning on certain parts, I want to just import a single skinned mesh, rather than the whole character collection.

When I drag and drop the bones from another skeleton onto a single mesh already using a different instance of the bone structure, they do not move at all during animation. Any idea why?

You don’t say what animation type you’re importing as. If it’s Legacy (or pre-Unity 4) then you can’t simply drop skeletons onto characters. When you drag an FBX into the scene the skinnedmeshrenderer contains bindings to the bones in the FBX structure, and replacing them will break the referencing.

What you’re trying to do may be easier or more flexible with Mechanim’s system, which uses an Avatar paradigm - basically, you export a “Master” character without animation but with the full skeleton, then when you’re exporting other characters or clothing setups, for each export in the Rig tab you can choose to use your Master character’s Avatar (Avatar Definition: Copy From Other Avatar). You can then do the same for animation, and the animation you import as i.e. Humaniod can be used to drive any of the characters. They all derive from the same Master avatar template, so it’s much cleaner. Additionally, when it comes to animating seperate clothing/accessory skins, you can drive them all from the same Animation Controller - Mecanim’s state machine. This is a lot less hassle than having to ensure every item of clothing is playing the same animation at the right time in the Legacy system.

There are other ways to solve your issue, this is just off the top of my head, but it’s worth reading up on all of these to get an idea of the do’s and don’ts.

Thanks for the info, Pix10.

Mecanim sounds useful in some departments, but without animation events I can’t even fathom how to use it for the type of game I’m making (or any other type of game that animation events would be used in).

I suppose the best option I have is creating a pooling system so I don’t have to re-instantiate the character prefabs that have 100 meshes associated with them more than once. Then just disabling the meshes that are not in use.