I have a model with nested game objects that have skinned mesh renderers that are linked to that model’s bone hierarchy. This nested objects are its clothing, so when the model moves, its clothes deforms with it accordingly. I’m trying to add new clothes to it, but they don’t deform at all.
I’m thinking that maybe I shouldn’t link a picture of the entire model, as it is kind of NSFW, so here are some pictures of the clothing item in question.
To the left is the default boot which I imported together with the complete model. To the right is the new boot that I imported with the very same complete model, but at a later time.
Here is how this new boot deforms when its entire model is added to the scene.
This is what happens when I try to attach this game object to another model.
Even though I changed this new item’s Root Bone property’s, it’s still not linking itself with the other model’s bones.
The model which I’m trying to nest this new boot is my main prefab that has much work done to it (ragdoll, hitboxes, tags, custom scripts that use specific bones, etc). The only thing that seems I can do is to recreate this prefab again, with the new model this time. That is very inefficient for me, as I have a lot of prefabs that would need to be created all over again. Looking through the documentation is not yielding answers to this, neither googling for this. How do you nest new skinned mesh renderers to game object and link its bones to it?
Edit: Issue solved. As I’m not skilled enough as a programmer to make a script of my own without scratching my head for hours, I grabbed the one linked by Cherno. The formatting was a little messed in the post, so I took the liberty to fix it and put it on a pastebin: https://pastebin.com/RVY8ygur.