0
\$\begingroup\$

I have a scroll view with lots of buttons on it. when i press one button, that button needs to change the sprite and stay like that. if any other button (or same one) is pressed previous button needs to revert back to original sprite.. here is some example enter image description here

button 2 was pressed and changed sprite, it stays like that untill it is pressed again or any other (in this case button 3) is pressed

\$\endgroup\$
1
  • \$\begingroup\$ Try rephrasing this in a way that turns it into a question. I'm unsure what information you are looking for. \$\endgroup\$
    – JonBee
    Jan 20 '16 at 16:48
0
\$\begingroup\$

You should use UIToggle with Toggle Group instead of doing it manually.

You can create multiple Toggle buttons having same Toggle Group then so only one button (toggle button) will be enabled at a time.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you, i used your advice to learn more about toggles in unity and they work like charm.. \$\endgroup\$ Jan 23 '16 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.