Search Unity

Animator. runtimeAnimatorController switching and resetting.

Discussion in 'Animation' started by RockenX, May 22, 2018.

  1. RockenX

    RockenX

    Joined:
    Oct 17, 2012
    Posts:
    14
    Situation:
    I'm currently trying to use two different runtimeAnimatorController. the first one is a Animator Override and the second one is a unique to that gameobject.

    I'm trying to get them to switch between the two base on what animation state we want to play.

    but right now after I change the runtimeAnimatorController . the Animator doesn't reset back to it state before the change.

    for example:
    When I'm not changing the runtimeAnimatorController:
    I have a gameobject that turn active in the middle of the animation, when we change the state of this Animator, the gameobject active will get set back to false.

    Now with the changing of the runtimeAnimatorController:
    We change to the runtimeAnimatorController to a new Animator and it animation turns on the Active of the gameobject . but the next time we change the state we set the runtimeAnimatorController back to the previous one and play the next animation. The gameobject active did not set back to false as expected.

    Any ideas on to what I can do to have the reset get called before changing the Animator in the runtimeAnimatorController?

    If not is there another way to use a Shared Animator with a Unique Animator? We tried having one Shared Animator overall with different layers as Unique States. But the Animation drop down window get too big real quickly and we got a few conflict when multiple developer working on it.

    Thank you