Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    201
    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