GUIContent.image 界面图片

var image : Texture

Description描述

The icon image contained.

包含的图标图片。

var icon : Texture;

function OnGUI () {
	if(!icon) {
		Debug.LogError("Add a texture on the inspector first");
		return;
	}
	GUI.Button (Rect (0, 0, 100, 20), GUIContent (icon));
}
最后修改:2011年1月2日 Sunday 23:21

本脚本参考基于Unity 3.4.1f5

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