-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Unity Animation Essentials
By :
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 help us control when the Idle state (doing nothing) becomes a button-push state. Effectively, this parameter will act as a control switch for initiating animation playback. Inside the Animator window, click on the Parameters tab in the top-left corner...
Change the font size
Change margin width
Change background colour