The font to use for rendering. If null, the default font for the current GUISkin is used instead.
// Prints name of the font that customStyles[0] is usingfunction OnGUI() { if(GUI.skin.customStyles.Length > 0) Debug.Log("Font name: " + GUI.skin.customStyles[0].font.name);}
using UnityEngine;using System.Collections;public class example : MonoBehaviour { void OnGUI() { if (GUI.skin.customStyles.Length > 0) Debug.Log("Font name: " + GUI.skin.customStyles[0].font.name); }}
import UnityEngineimport System.Collectionsclass example(MonoBehaviour): def OnGUI(): if GUI.skin.customStyles.Length > 0: Debug.Log(('Font name: ' + GUI.skin.customStyles[0].font.name))