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

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

    Joined:
    Nov 26, 2012
    Posts:
    1,675