Home > other >  To solve! Click on the button in the unity images!
To solve! Click on the button in the unity images!

Time:09-28

How to achieve unity, click on an object, a picture, click again, the image disappear? Advice genuflect is begged!

CodePudding user response:

Too lazy to write the script can do it, do it the same two button, click shut itself down, another button to activate, activation/close pictures;

CodePudding user response:

reference 1st floor weixin_45848998 response:
too lazy to write the script can do it, do the same two button, click shut itself down, another button to activate, activation/close pictures;

Hierarchy palette right-click - & gt; The UI - & gt; Create Button Button, select the Button in the Inspector panel click on the + to add event under the OnClick (I said object will drag the Runtime, then behind drop-down box selected GameObject - & gt; SetActive (bool); Choose hook said activation, don't choose said closed)

CodePudding user response:

refer to the second floor weixin_45848998 response:
Quote: refer to 1st floor weixin_45848998 response:
too lazy to write the script can do it, do the same two button, click shut itself down, another button to activate, activation/close pictures;

Hierarchy palette right-click - & gt; The UI - & gt; Create Button Button, select the Button in the Inspector panel click on the + to add event under the OnClick (I said object will drag the Runtime, then behind drop-down box selected GameObject - & gt; SetActive (bool); Choose hook said activation, don't choose said closed)

All the pure hand phone to play, hope to adopt

CodePudding user response:

Is it not a togglebutton

CodePudding user response:

Toggle to meet your demand
  • Related