简体   繁体   中英

Unity 5 NGUI Highlighted Sprite Button Script Issue

I'm currently using Unity 5 GUI system and having one issue with the Highlighted Sprite Button Script. Under the Button Script / Sprite Swap / Highlighted Sprite, I can keep the highlighted sprite to stay highlighted, but once I clicked outside the button, it goes back to normal or the highlighted state goes away.

I wanted to the highlighted button to stay on so that the end user know which scene they are in.

How can I keep the highlighted state on until I press another button?

您可能要使用切换按钮而不是按钮。

You can just use disabled sprite instead of highlighted sprite and disable and enable each button as per you requirements.

Disable the button according to your scene, you can keep it disabled unless you press any other button. After your scene change just enable the old button and disable new pressed button.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM