Transition Duration value

posted to: Creating Buttons

It took me awhile to realize why my animation clips' duration didn't seem to affect the speed of the animations. Transition Duration was set to 0.25 for some reason. If Transition Duration is greater than the time of the animation clips, it will ultimately control the speed of the clips in gameplay. Setting Transition Duration to 0.1 for both the Highlighted/Pressed transitions fixed it for me.


NOTE: Setting Transition Duration to 0.0 seemed to result in this weird case where if I go off and on a button quickly and then stop over the edge of the button, sometimes it would just loop the Highlighted state (even though Highlighted's Loop is off). This is all without any mouse clicking:

I guess Transition Duration of 0.0 isn't desirable anyway, as it was making my animation jump when going from Pressed to Highlighted -- which was a previous question that I've edited out because I realized it was related to my Transition Duration being 0. But is setting it to 0.0 supposed to be allowed?

  • Jonathan Gonzalez(jgonzalez) replied

    The transition duration allows blending between animations so it's not so abrupt. You can set it to 0 if you want your animations to transition without any kind of blending. Sometimes you don't need animations to blend together, you just need them to be snappy.