GUIStyle.contentOffset 内容偏移

var contentOffset : Vector2

Description描述

Pixel offset to apply to the content of this GUIstyle

像素偏移适用于这个GUIstyle内容。

// Prints the value of contentOffset inside customStyles[0]
//打印customStyles[0]里的内容偏移值
function OnGUI() {
	if(GUI.skin.customStyles.Length > 0)
		Debug.Log(GUI.skin.customStyles[0].contentOffset);
}
最后修改:2011年1月23日 Sunday 22:03

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。