Search code examples
c#animationunity-game-engineanimator

Unity: Animator Component has a warning dialog in play mode that result in making a humanoid character in T pose


I have all animations working properly and game is almost complete. I am facing a very weird problem regarding a warning dialog under Animator component which probably saying some rigs have been deleted. and turn that humanoid character into T pose. however if i enable or disable "root motion " check. it start working properly.

What I am doing: I have a gameObject on which animator component is attached. a script that instantiate a humanoid character as a child on runtime. actually its a versus menu in which i can change opponent boxer (player). whenever I instantiate a new character , I destroy the old one and replace with new one. but problem is that new character doesn't animate rather remains idle in T pose. I have attached an image of warning dialog aswell . Need a way to go... thanks


Solution

  • If you change the hierarchy in runtime you must use Rebind(). After instantiating your GameObject and placing it as a child of your animator, call animator.Rebind();