GUIStyle.name 名字

var name : string

Description描述

The name of this GUIStyle. Used for getting them based on name....

这个GUIStyle的名字。用于获取基于名字的样式。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnGUI() {
		if (GUI.skin.customStyles.Length > 0)
			Debug.Log(GUI.skin.customStyles[0].name);

	}
}
// Prints the name of the style at customStyles[0]
//打印样式在ustomStyles[0]的名字
function OnGUI() {
	if(GUI.skin.customStyles.Length > 0)
		Debug.Log(GUI.skin.customStyles[0].name);
}
Page last updated: 2011-1-20