GUISkin.GetStyle 获取样式

function GetStyle (styleName : string) : GUIStyle

Description描述

Get a named GUIStyle.

获取一个命名的GUIStyle

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	private bool b;
	void OnGUI() {
		b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button"));
	}
}
private var b : boolean;

function OnGUI() {
	b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button"));
}
Page last updated: 2011-1-25