Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Question Runtime Animator Controller Override resets animator variables ?

Discussion in 'Animation' started by Meishin, Oct 10, 2020.

  1. Meishin


    Apr 12, 2019
    Hi guys,

    In 2019.3 i was overriding Runtime Animator controller and everything was smooth, for instance ;
    Code (CSharp):
    2.         animator.SetBool("AutoTrigger", true);
    4.         // Override Animator if any
    5.         if (_AnimatorOverride != null)
    6.             animator.runtimeAnimatorController = _AnimatorOverride;
    7.         else
    8.             animator.runtimeAnimatorController = SavedState.Controller;
    Was running smoothly, i would then trigger whatever animation state i needed and it would pick up AutoTrigger value just fine.

    Now in 2020.1, when assigning a new runtimeAnimatorController, AutoTrigger just resets to False.

    Is this a new intended behavior ? Is there a way to avoid that ?
    Ofc In the example i don't really care, i just set up AutoTrigger after assigning Runtime Animator Controller and it worked, however this is very problematic for all other animator variables not linked to this system.

    Thanks in advance
    trombonaut and ptz4ever like this.