Search Unity

Mecanim returns wrong speed

Discussion in 'Animation' started by Drowning-Monkeys, Nov 14, 2014.

  1. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Hi there,

    I'm using Mecanim for to handle states in the new uGUI (4.6), and I'd like to disable certain GUI GameObjects when the are dismissed. So, to do this, I put a function at the beginning of the animation called "DisableObject". The function checks to see if the speed of the animator is set to -1.

    I use the same animation to bring in and dismiss. When i dismiss, i set the speed of the state to -1, and use the same animation. That's why i check for a -1 speed.

    However, speed always returns 1. Even though the state set in Mecanim is clearly -1, and it wouldn't be dismissing if it weren't.

    Thoughts? Why am i getting the wrong speed?