How do you get GUI Button "On" States

I'm just wondering how I can get a GUI.Button to show it's "On Normal", "On Hover", etc. states after it has been clicked once. Basic example code would be greatly appreciated.



Try this:

toggleVariable = GUILayout.Toggle(toggleVariable,toggleText,"button")

By creating a toggle which uses the button style, it essentially creates a component which looks like a button, but acts like a toggle. When you click it, the "button" stays in the down state, and when you click again, it stays in the up state. You can then use toggleVariable to tell whether it's up or down (true=down, false=up).

Surely this is a bug? I am having the same problem. After you click a button for the first time, the hover texture will not show up anymore.