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

Weird problem - Mecanim animation controller not firing ?

Discussion in 'Animation' started by Darjamfar, Sep 9, 2013.

  1. Darjamfar

    Darjamfar

    Joined:
    Jun 4, 2012
    Posts:
    63
    This is probably impossible for anyone to figure out without seeing it go wrong, maybe someone has an idea why these things can happen?

    I have a main menu, a play game level and a store level. One can purchase and select one of numerous animated Mecanim and legacy animation characters. In the store the Mecanim characters animate through a cycle of moves to show what they can do. I can go in and out of the store many times and each time the characters animate no problem. Now if i go and play the game with ANY one of the characters the play game works fine, now if I go back into the Store level all the characters appear but there is no animation, they are all in T-pose. Even the buttons which could select a character and fire off particle effects stop working. Like i say it's weird. I can then go back into play game and my character animates fine.

    Looking at what is happening in the Mecanim animation controller(in store level), the animation is "stuck" on the first animation (theres a tiny bit of blue to indicate it;s on frame 1). The script for the Mecanim character is running in update. It has grabbed the anim component - i can see plenty of values there.

    The AnimatorStateInfo.normalizedTime is 0 and stays 0, and AnimatorStateInfo.lengh is 0 and stays 0. My feeling is it feels like an error in Mecanim.

    When i fire particle effects, they appear in hierarchy but they don't animate either !

    Can anyone think of anything which i might be able to investigate ?

    Thanks
     
    Last edited: Sep 9, 2013
  2. Darjamfar

    Darjamfar

    Joined:
    Jun 4, 2012
    Posts:
    63
    I've found the problem. Time.timeScale was set to 0.

    In my Play Game level when i press pause to exit the level i set timeScale to 0. Jumping straight to the main menu and onto Store keeps the timeScale at 0. Simple. As soon as i saw the particle effects were not animating i knew it wasn't Mecanim.