Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


backgroundColor

Global tinting color for all background elements rendered by the GUI.
Read time 1 minuteLast updated 7 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.IMGUIModule
public static Color backgroundColor { get; set; }

Remarks

This gets multiplied by GUI.color.
Additional Resources: GUI.contentColor, GUI.color.
GUIBackgroundColor (backgroundColor)
Yellow Background color applied to a button.

Examples

using UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour{ void OnGUI() { GUI.backgroundColor = Color.yellow; GUI.Button(new Rect(10, 10, 70, 30), "A button"); }}