I'm a newb to GUI UI, trying to change the Background color and something is not working: Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using WBG; public class btnStoreButtonClick : MonoBehaviour { private Rect windowRect = new Rect((Screen.width - 400) / 2, (Screen.height - 200) / 2, 400, 200); private bool show = false; private string _Title; private string _Message; Color _WBGColor = new Color(91f, 203f, 188f, 10f); void OnGUI() { GUI.backgroundColor = _WBGColor; if (show) { windowRect = GUI.Window(4, windowRect, DialogWindow, _Title); } } // This is the actual window. void DialogWindow(int windowID) { GUI.Label(new Rect(5, 20, windowRect.width, 20), _Message); switch (windowID) { case 0: if (GUI.Button(new Rect(320, 160, 50, 30), "OK")) { show = false; } break; case 1: if(GUI.Button(new Rect(200, 160, 50,30), "Abort")) { show = false; } else if(GUI.Button(new Rect(260, 160, 50, 30), "Cancel")) { show = false; } else if (GUI.Button(new Rect(320, 160, 50, 30), "OK")) { show = false; } break; case 2: if (GUI.Button(new Rect(270, 160, 50, 30), "Yes")) { show = false; } else if (GUI.Button(new Rect(330, 160, 50, 30), "No")) { show = false; } break; case 3: if (GUI.Button(new Rect(270, 160, 50, 30), "Retry")) { show = false; } else if (GUI.Button(new Rect(330, 160, 50, 30), "Cancel")) { show = false; } break; case 4: if (GUI.Button(new Rect(270, 160, 50, 30), "Help")) { show = false; } else if (GUI.Button(new Rect(330, 160, 50, 30), "OK")) { show = false; } break; default: if (GUI.Button(new Rect(270, 160, 50, 30), "Yes")) { show = false; } else if(GUI.Button(new Rect(330, 160, 50, 30), "No")) { show = false; } break; } } public void ShowMessageBox(string Title, string Message) { _Title = Title; _Message = Message; show = true; } } I thought this was how you built color via rgb: Code (CSharp): Color _WBGColor = new Color(91f, 203f, 188f, 10f);
So use color32 instead of color to set the background color? Tried this but now the message box does not popup: Code (CSharp): Color32 _WBGColor = new Color32(91, 203, 188, 10); Never mind I got it working now. How do you set the color for the rect and the title bar area?