Unity uses Button to control the display and hiding of pictures (super simple) without code

1. Create two new Buttons, name them on and off respectively, and name the corresponding text on and off.
insert image description here
2. Set the OnClick() of the on button and click the plus sign, as shown in Figure
insert image description here
3. Set the OnClick() attribute of the off button:
insert image description here
complete ! !

Guess you like

Origin blog.csdn.net/qq_44310867/article/details/115456033