Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

GUISkin

class in UnityEngine

/

Inherits from: ScriptableObject

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

Defines how GUI looks and behaves.

GUISkin contains GUI settings and a collection of GUIStyle objects that together specify GUI skin.

Active GUI skin is get and set through GUI.skin.

Variables

boxStyle used by default for GUI.Box controls.
buttonStyle used by default for GUI.Button controls.
customStylesArray of GUI styles for specific needs.
fontThe default font to use for all styles.
horizontalScrollbarStyle used by default for the background part of GUI.HorizontalScrollbar controls.
horizontalScrollbarLeftButtonStyle used by default for the left button on GUI.HorizontalScrollbar controls.
horizontalScrollbarRightButtonStyle used by default for the right button on GUI.HorizontalScrollbar controls.
horizontalScrollbarThumbStyle used by default for the thumb that is dragged in GUI.HorizontalScrollbar controls.
horizontalSliderStyle used by default for the background part of GUI.HorizontalSlider controls.
horizontalSliderThumbStyle used by default for the thumb that is dragged in GUI.HorizontalSlider controls.
labelStyle used by default for GUI.Label controls.
scrollViewStyle used by default for the background of ScrollView controls (see GUI.BeginScrollView).
settingsGeneric settings for how controls should behave with this skin.
textAreaStyle used by default for GUI.TextArea controls.
textFieldStyle used by default for GUI.TextField controls.
toggleStyle used by default for GUI.Toggle controls.
verticalScrollbarStyle used by default for the background part of GUI.VerticalScrollbar controls.
verticalScrollbarDownButtonStyle used by default for the down button on GUI.VerticalScrollbar controls.
verticalScrollbarThumbStyle used by default for the thumb that is dragged in GUI.VerticalScrollbar controls.
verticalScrollbarUpButtonStyle used by default for the up button on GUI.VerticalScrollbar controls.
verticalSliderStyle used by default for the background part of GUI.VerticalSlider controls.
verticalSliderThumbStyle used by default for the thumb that is dragged in GUI.VerticalSlider controls.
windowStyle used by default for Window controls (SA GUI.Window).

Public Functions

FindStyleTry to search for a GUIStyle. This functions returns NULL and does not give an error.
GetStyleGet a named GUIStyle.

Inherited members

Variables

hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Public Functions

GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the game object.

Static Functions

DestroyRemoves a gameobject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateReturns a copy of the object original.
CreateInstanceCreates an instance of a scriptable object.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

Messages

AwakeThis function is called when the ScriptableObject script is started.
OnDestroyThis function is called when the scriptable object will be destroyed.
OnDisableThis function is called when the scriptable object goes out of scope.
OnEnableThis function is called when the object is loaded.