GUIStyle.name Manual     Reference     Scripting  
Scripting > Runtime Classes > GUIStyle
GUIStyle.name

var name : string

Description

The name of this GUIStyle. Used for getting them based on name....

JavaScripts
// Prints the name of the style at customStyles[0]

function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
Debug.Log(GUI.skin.customStyles[0].name);
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void OnGUI() {
if (GUI.skin.customStyles.Length > 0)
Debug.Log(GUI.skin.customStyles[0].name);

}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def OnGUI():
if GUI.skin.customStyles.Length > 0:
Debug.Log(GUI.skin.customStyles[0].name)