O'Reilly logo

Mastering Unity 2D Game Development - Second Edition by Simon Jackson, Ashley Godbold

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

UI Buttons

UI Buttons are objects that are meant to be clicked, but they can also respond to other actions, for example, when the mouse hovers over them; the following screenshot shows the Button component:

UI Buttons

When you create a UI button, the Button component is automatically added to it, but an Image component is also automatically added to it. This determines what the Button will look like in its normal state.

Transition types

By selecting from the Transition drop-down menu, you can determine how the button reacts to being pressed, when it is hovered over, or when it is disabled. The three Transition options are Color Tint, Sprite Swap, and Animation ...

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