Version: 1.3
LanguageEnglish
  • C#

GUISkin

class in UnityEngine

/

Inherits from:ScriptableObject

/

Implemented in:UnityEngine.IMGUIModule

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

Submission failed

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

Close

Cancel

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.

Properties

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 (Additional resources: GUI.Window).

Public Methods

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

Inherited Members

Properties

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

Public Methods

GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static Methods

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
InstantiateAsyncCaptures a snapshot of the original object (that must be related to some GameObject) and returns the AsyncInstantiateOperation.
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

AwakeCalled when an instance of ScriptableObject is created.
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.
OnValidateEditor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
ResetReset to default values.