UI

Button

Button can be used to create interactive buttons within a UICanvas.

Editor Usage

Add Button Node

Add a Button node in the Hierarchy Panel.

If the parent or ancestor node does not have a Canvas component, a root Canvas node will be automatically added.

Set Transition

In the editor, you can easily set the button's transition effects for different states.

Properties

Property NameDescription
transitionsAll the transition effects of the button
interactiveWhether the button is interactive

Methods

Method NameDescription
addTransitionAdd a transition effect to the button
removeTransitionRemove a transition effect from the button
addClickedAdd a click callback function
removeClickedRemove a click callback function

Script Development

Was this page helpful?