- Home /
Is it possible to update the exposed transforms (bones) of a prefab?
When importing a new model/rig there's the option to 'Optimize Game Objects' under the Rig Tab of the import settings where if you have the option selected, you can manually choose which bones/transforms to expose under the 'Extra Transforms to Expose' menu.
In this particular case, I imported a model with a humanoid rig and exposed its right hand transform during the import setup. After import, I created two instances of the character in a scene and made one of them a prefab. In the scene, the right hand transform is visible as a child of both the prefab and non prefab instances of the character.
But here's where I run into trouble. At a later time, I may need to expose another transform of the rig but if I do so, I've found that only the non prefab instances of the character is updated with the new transform. So let's say in this case that I exposed the left hand transform. The transform would become visible in the non prefab instance but not in the prefab.
It's not a huge deal, but it's kind of a pain to have to rebuild an entire prefab from scratch every time I need to expose a new transform. So anyway, I was just wondering if anyone knows if I'm doing something wrong here or that there's a better way. Thanks for your time!
Answer by hancin · Mar 16, 2020 at 02:20 AM
https://docs.unity3d.com/ScriptReference/AnimatorUtility.OptimizeTransformHierarchy.html
hope it helps...
Your answer
Follow this Question
Related Questions
Rotating specific prefab - instantiated with Random.Range 2 Answers
Why Transform and not Prefab? 2 Answers
Unable to Instantiate prefab. Prefab may be broken 3 Answers
Array of prefabs 0 Answers
Prefab not rendering 2 Answers