I have an animation clip I made with Mechanim. But when I changed the hierarchy of the objects in the children, it stopped working!
The text says ( Missing! )
Why is it breaking? How can I fix it?
In Unity, Animations are bound by name, so if you change the name of any object, or move the object to a different parent (thereby changing the path), the animation will break.
Do not attempt to use a 'find and replace' feature with a text editor, as this is known to cause corruption.
Luckily, Unity has a built-in (though somewhat hidden) API for editing animations. If you have a big project and a team, one of your developers ought to learn this API and make an editor to handle this.
If not, you can use this free tool, which I have tried and works well (saving me hours of time by not needing to redo my animations!)
(Note: tool is open source)
After changing the name of a GameObject in the Hierarchy window, you can click the GameObject in the Animation window and rename it to make them identical.