GUIStyle.fixedHeight 固定高度

var fixedWidth : float

Description描述

If non-0, any GUI elements rendered with this style will have the height specified here.

如果为非0,任意这个类型的渲染的GUI元素将具有这里指定的高度。

using UnityEngine;
using System.Collections;

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

	}
}
// Prints the value of fixedHeight of customStyles[0]
//打印customStyles[0]的固定高度值

function OnGUI() {
	if(GUI.skin.customStyles.Length > 0)
		Debug.Log(GUI.skin.customStyles[0].fixedHeight);
}
Page last updated: 2011-1-23