static var backgroundColor : Color
Description描述
Global tinting color for all background elements rendered by the GUI.
This gets multiplied by color.
全局染色由GUI渲染的所有背景元素,得到乘以颜色。
参考: contentColor, color.
Yellow Background color applied to a button.
应用给按钮一个黄色背景颜色。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
GUI.backgroundColor = Color.yellow;
GUI.Button(new Rect(10, 110, 70, 30), "A button");
}
}
function OnGUI() {
GUI.backgroundColor = Color.yellow;
GUI.Button(Rect(10,110,70,30), "A button");
}