Animator not resetting anymore when deactivating its game object

Before, when you deactivate and reactivate an object it used to reset the Animator to its default state, but now when you deactivate and activate an object it doesn’t, it continues from the last state!

This was really useful for UI animators where you needed to play a default animation right when they gets visible, then they sits there looping in a default state, then you disable when you want and if you want them to reappear and play its “became visible” animation again you just set it visible again, without needing to do anything else.

What happened? Can’t we at least have a bool to control this?

Same issue here.

I think this was fixed inf 5.6.0p1! Unity Issue Tracker - Animator keeps StateMachine state when disabling GameObject

Like I said on the issue tracker, this could turn into a very useful feature! Just let us choose between both behaviors with a toggle in the animator, I stumbled on to this before and I needed that this “bug” existed.

2 Likes