Animation

The Animation Transition allows the button to animate in its various states.

Animation transition types require an Animator Component attached to the Button. It can add a preexisting set of animations to a Button by dragging it onto the Button's Inspector, or you can make a whole new Animator Controller by selecting Auto Generate Animation. If you use a preexisting Animator Controller, you can simply assign the Animations to the individual states. However, if you generate a new Animator Controller, you can select the state from the list of Clips in the Animation window and edit them from that window. An example of making a Button with animated transitions is provided in the examples section of the text.

Get Mastering UI Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.