Version: 2020.2
public GUIStyle GetStyle (string styleName);

描述

获取命名的 GUIStyle

using UnityEngine;

public class Example : MonoBehaviour { bool b;

void OnGUI() { b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button")); } }