Hi,
I would like to put my animator on child gameobject for cleaning my hierachy but my animator only work if i put my animator on main gameobject.
Hi,
I would like to put my animator on child gameobject for cleaning my hierachy but my animator only work if i put my animator on main gameobject.
You can put animator components on any object in the scene, but your animations or scripts may not work.
Animations use string references (the name of objects and their parent relationships) to know which objects to move, so changing an animator to a different object might break the animations on that animator controller.
Scripts that reference an animator may also stop working if you swap that animator to a different object.
How to fixe that ?
I use mixamo animation.
You can tell if your animations are broken if they have yellow references like this:

Make sure you click on the object with the animator, not the animation in the project window to see if the references are okay.
To fix this, you can manually rename them by slow double clicking on each one.
I use a script to rename them all at the same time: GitHub - s-m-k/Unity-Animation-Hierarchy-Editor
There’s a README file included that will tell you how to use it.
If you need any help, just let me know.
Just to add here, but sometimes, there just is a logical place for such a component, and completely unreasonable places for it to be as well.
In the case of a character, its almost 100% guaranteed you do not want your animator attached to a leg object in the rig. But im sure obvious is obvious. GL.