Files
engine/docs/en/UI/quickStart/button.md
2025-01-25 12:39:17 +08:00

1.4 KiB

order, title, type, label
order title type label
4 Button UI UI

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 Name Description
transitions All the transition effects of the button
interactive Whether the button is interactive

Methods

Method Name Description
addTransition Add a transition effect to the button
removeTransition Remove a transition effect from the button
addClicked Add a click callback function
removeClicked Remove a click callback function

Script Development