Hello, I am working on a game with my daughter and am a bit stuck with animations. I’m still learning as much as I can, and try and consult docs on everything first.
I have a simple 2d game I’m working on and am taking advantage of the native animation in Unity. For a player that is an ant, I have 2 clips that animate the same GameObject for walk and rest, and 1 clip for a death animation that makes an ant angel GameObject rise up and disappear.
I’ve noticed that if I try and stick this angel clip into the same animation controller as the other two clips, it completely breaks the movement in my script. I’m assuming this is because Unity animation expects the same objects to transition clips in an animation controller. This keeps me from using conditions to switch between animation states easily.
So my query is this - what’s the best way to handle multiple clips with disparate GameObjects for the same character?
I’ve tried instantiating a prefab of the angel with it’s own animation controller at the position of the ant, but I’m not sure how to make the ant disappear and trigger back to the start at the end of the angel animation. Turning off all the rigidbody physics and making the ant disappear then come back when the angel animation completes is an idea I am tossing around. But I’m wondering if anyone has a better way to handle this the Unity way.
As long as the setup of the character (ant) stays within the complexity you described and does not get more complex - with swapping out more ‘characters’ for the existing ant, I think you are on the right track.
The tried and true game dev ‘magic’ swap. 
Can you clarify this - it doesn’t make much sense - ‘trigger back to the start at the end of the animation’?
Are you attempting to say - when the animation of the angel ends you want to bring back the ant into the scene?
I’m not a coder - so this is only simple logic. When angel animation ends - turn invisible angel and turn visible ant.
If this is only one ‘special’ situation when the ant dies and the angel does not have a lot of bones and only one animation cycle - it might be alright to keep the angel in the scene at all times and only turn on/off the sprite or skinned mesh renderers for each - ant and angel. But you will have to decide if this is optimal for your game or not.
The other options are instantiation and destroy - but I think destroy causes issues with garbage (not sure about this) so the garbage might need cleaned up or somehow overcome. There is probably another optimal way other than destroy to de-instantiate / remove an asset from the scene. Research for this to see if there is something more optimal than destroy, but if I was doing this I’d first test keeping the angel in scene and just turning on/off visibility when needed.