Version: 2021.2
public Font font ;

描述

用于渲染的字体。如果为 null,则改为使用当前 GUISkin 的默认字体。

using UnityEngine;

public class Example : MonoBehaviour { // Prints name of the font that button is using.

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