Game Development Reference
In-Depth Information
When you attach the preceding script with the GUIStyle property to a GameObject
in your scene, it will look like this in Inspector :
Note that the first time you open it in the editor you will
get NullReferenceException in the console window;
this is just because you haven't configured GUIStyle yet.
If you don't want to apply a style to each and every control directly, you can then
optionally create GUISkin , which contains all the styles for each control type.
This is then applied using the GUI class prior to drawing any controls.
A GUISkin also has some additional options that apply to the GUI, which include:
• Setting whether a double-click action selects
• Setting whether a triple-click action selects
• The color of the cursor
• The cursor flash speed
• The default selection color
• Custom styles (an array of GUIStyle properties you can then reuse
on controls)
 
Search WWH ::




Custom Search