- Home /
Setting render state of a GUI component
I'm building my own OO code based gui system on top of GUI and in general its going fairly well.
But I have run into a stumbling block in that I want to use Unity's built in skin system, but I cannot find a way to tell a control which selection (eg "normal","active" etc) to use. Is this hiding somewhere or is it another example of "if its not the one use case we thought of then you can't do it" in Unity?
I guess I wasn't clear. Every GUIStyle has a set of settings... "normal","active" etc. I could hack a GUI style and copy active to normal, for instance but that is definitely a hack and arse backwards. The whole point of HAVING these different states in GUIStlye is so that they can be used to indicate different states of the component.
What is apparently missing from the API however is a way to manually change that state.
Answer by Berenger · Feb 22, 2012 at 07:23 AM
An example of what you're talking about would be a self-made selection grid, an array of button with one of them explicitely told "You are active now". Am I right ? Because I don't think that's possible the easy way, and you probably need a new style with the old active in it's normal.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Sizing skin text 0 Answers
why i'm not geting Toggle symbol when i apply fontstyle(GUIStyle)? 1 Answer
Some of my custom GUISkin setting only work with Pro Skin 0 Answers
Replace a Skinned Mesh in a character with a new Skinned Mesh 2 Answers