O'Reilly logo

Unity Animation Essentials by Alan Thorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mecanim transitions and parameters

The problem with the push-button Mecanim graph created previously is that although it prevents any animation from playing automatically at scene startup, there's still no way to initiate the push-button animation when it's supposed to play later, that is, when the player clicks on it. The aim now is to rewire the Mecanim graph so that we have control over when the button-push animation plays, allowing playback at an arbitrary time. To achieve this we'll use transitions and parameters. Transitions are simply connections between states that allow one state to move to another. Parameters are variables, or switches, that we can create to fire a transition between two states. Let's now create a parameter that'll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required