public Font font ;

설명

The default font to use for all styles.

using UnityEngine;

public class Example : MonoBehaviour { // Modifies the font only of the current GUISkin.

public Font font;

void OnGUI() { if (!font) { Debug.LogError("No font found, assign one in the inspector."); return; } GUI.skin.font = font;

GUILayout.Label("This is a label with the font"); GUILayout.Button("And this is a button"); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961