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. Dismiss Notice

Maintaining Mecanim state while inactive

Discussion in 'Animation' started by casimps1, Mar 12, 2015.

  1. casimps1

    casimps1

    Joined:
    Jul 28, 2012
    Posts:
    254
    I have a small animation controller with 4 states. I have an int parameter that triggers transitions through those different states.

    The controller starts in state 1 (the default state). Then I transition to state 4 by setting my int param. Then I deactivate the GameObject w/ the Animator component. I then notice that when I reactivate the GameObject, the Animator has reset back to state 1.

    Is this expected behavior? I thought it would still be in state 4 when it reactivated. If that's by design, what would be the appropriate way to handle starting immediately back in state 4 when the GameObject reactivates?
     
  2. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675