GUI.color 颜色

static var color : Color

Description描述

Global tinting color for the GUI.

This will affect both backgrounds & text colors.

全局GUI染色,将影响背景和文本颜色。

另见: backgroundColor, contentColor.

GUI.color 颜色

Yellow Color on the GUI Controls.
给GUI控件应用黄色。


function OnGUI() {
	//用黄色染色所有GUI元素
	GUI.color = Color.yellow;
	GUI.Label(Rect(10, 10, 100, 20), "Hello World!");
	GUI.Box(Rect(10, 50, 50, 50), "A BOX");
	GUI.Button(Rect(10,110,70,30), "A button");

}
最后修改:2011年6月15日 Wednesday 10:51

本脚本参考基于Unity 3.4.1f5

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