public static Color color ;

Description

GUI 的全局着色颜色。

将影响背景和文本颜色。

另请参阅:backgroundColorcontentColor


Yellow Color on the GUI Controls.

// Tints all GUI drawn elements with yellow.

using UnityEngine; using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { GUI.color = Color.yellow; GUI.Label(new Rect(10, 10, 100, 20), "Hello World!"); GUI.Box(new Rect(10, 50, 50, 50), "A BOX"); GUI.Button(new Rect(10, 110, 70, 30), "A button"); } }