Button component

The Button component provides all the properties that allow the player to interact with the button and determine what the Button will do when the player attempts to interact with it.

The first property of the Button component is the Interactable property. This property determines whether the Button can or cannot be interacted with by accepting input from the player. This is turned on by default, but can be turned off if you want to disable the button.

You'll see that the Button component already has an On Click Event attached to it. The On Click Event triggers when the player clicks and releases the mouse while hovering over the button. If the player clicks on the Button, moves the mouse outside of the Button's Rect Transform, ...

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.