set a skin to "on" state programatically

Hi,

I would like to set the style of a gui component to "on" but I fail to find how I can achieve that by code. This is not a button or toggle, and I have to set it via code not via user input.

I looked at GUIStyle.Draw help section. It seems to give options to set the on state but I do not understand nor find examples on how to use this function.

Thanks for your input.

Bye,

Jean

I would love to see this answered. I would like to make ButtonB go to its "on normal" state when the mouse is over ButtonA.

2 Answers

2

Looking for an answer to the same question...

Should have been a comment really... create an answer if you actually have the answer :)

ah indeed. oops!

I’ve had the same issue in the past and I ended up writing a class customized to my needs with toggle buttons. However, depending on your end goal, the GUI.Toolbar might work out for you. Here’s a link:
GUI.Toolbar