Button
can be used to create interactive buttons within a UICanvas.
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.
In the editor, you can easily set the button's transition effects for different states.
Property Name | Description |
---|---|
transitions | All the transition effects of the button |
interactive | Whether the button is interactive |
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 |