Rect rec = new Rect (0, 0, Screen.width, Screen.height/4);
so I’d want something like rec.ColorFill(Orange)
anyone know a way to achieve something like this?
In your favorite image editing program, create a white texture. It does not have to be very big. Then you can do:
void OnGUI() {
GUI.color = Color.red;
GUI.DrawTexture(rec, tex);
}
Where ‘tex’ is a reference to your texture. Note the rec is in GUI coordinates. If your rec is in Screen coordinates, you’ll need to the following:
rec.y = Screen.height - rec.y;