Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

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

GUIStyle.font

Switch to Manual
public Font font;

Description

The font to use for rendering. If null, the default font for the current GUISkin is used instead.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { Debug.Log("Font name: " + GUI.skin.button.font.name); } }