Hi everyone,
I’m running into an issue with the Animator component after updating to Unity 2021.3.45f2.
Previously, my animation system worked fine, but now when I disable and re-enable a GameObject that has an Animator, the animation freezes at the last played keyframe instead of resetting to its default state.
Here’s the setup:
- I have a GameObject named BG with an Animator and three animation clips:
AnimCheck,AnimCheck1, andAnimCheck3. - There are two UI buttons:
- Start → plays the
AnimCheck1animation clip. - Stop → stops the animation.
- Start → plays the
- There’s also a Reset button (different GameObject) that disables the BG GameObject.
- A ResetAnim button re-enables the BG GameObject.
Expected Behavior:
When the BG GameObject is re-enabled, the Animator should return to its default / idle state (AnimCheck), so the animation looks reset — as it did before disabling.
Actual Behavior:
If I disable the BG GameObject while AnimCheck1 is playing, and then re-enable it:
- The animation freezes on the last keyframe where it was stopped.
- The Animator does not reset or revert to its entry state.
- When I click Start again,
AnimCheck1plays correctly from the beginning. - But immediately after re-enabling BG, it shows a frozen frame instead of resetting visually.
This behavior only started after updating Unity to 2021.3.45f2.
Before the update, re-enabling the GameObject always reset the Animator correctly.
What I’ve Tried:
I’ve already tested common workarounds:
animator.Rebind()animator.Play("AnimCheck", 0, 0f)- Reassigning the RuntimeAnimatorController
- Disabling and re-enabling the Animator component
keepAnimatorControllerStateOnDisable = false- Destroying and recreating the Animator component
None of these approaches restore the original reset behavior — the animation always remains frozen on the last frame when the GameObject is re-enabled.
Question:
Is this a known regression or intended change in Unity 2021.3.45f2?
If not, how can I properly reset the Animator’s state so that when a GameObject is disabled mid-animation and later re-enabled, it returns to its default entry state instead of staying frozen?
Environment:
- Unity Version: 2021.3.45f2
- Platform: Android/iOS (reproducible in Editor too)
- Animator Type: UI GameObject with Animator component and simple state transitions
- Issue: Animation state persists / freezes after GameObject is re-enabled
Would really appreciate if the Unity team could confirm whether this is a regression or suggest a clean way to reset the Animator state on re-enable.
Thanks in advance!