Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

GUISkin.FindStyle

Switch to Manual
public function FindStyle(styleName: string): GUIStyle;

Parameters

Description

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

	// Checks if a style name exists

var aStyleName : String = "A Style I have"; function OnGUI() { if(GUI.skin.FindStyle(aStyleName) == null) { Debug.LogWarning("No style named \"" + aStyleName + "\" could be found"); } }