Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback Animator.keepAnimatorControllerStateOnDisable = true should be default

Discussion in 'Animation' started by DungDajHjep, Mar 22, 2021.

  1. DungDajHjep

    DungDajHjep

    Joined:
    Mar 25, 2015
    Posts:
    199
    If you do a simple animation (call it animation_A), for example disable a child gameobject (call its gameobject_01), then switch to another animation, gameobject_01 will return to its default state before running animation_A.
    But if you finish animation_A then disable root gameobject ( gameobject containing the animator - example dead animation of an enemy), when you change to another animation, gameobject_01 will keep its changed state caused by animation_A.

    It took me a long time to find the answer in countless questions, and I wonder why this is not Unity's default?
    Answer link:
    https://answers.unity.com/questions/919995/parameters-and-states-of-animator-reset-on-objects.html