0

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?

Ben Hymers
  • 25,586
  • 16
  • 59
  • 84
Coder
  • 499
  • 3
  • 13
  • 29

2 Answers2

0

You might want to use a toggle button rather than a Button.

Zohaib Zaidi
  • 288
  • 4
  • 11
  • I'm currently using toggle buttons at the bottom of the screen, but wanted to keep the gui button on the left. I don't want to recreate two set of toggle buttons. – Coder Nov 18 '15 at 13:13
  • You can change the appearance of toggle buttons to look like normal buttons. Change the background image to the normal state and change the checked image to your selected image – Zohaib Zaidi Dec 02 '15 at 15:00
0

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.

S.Waraich
  • 9
  • 2