solid color screen using GUI

How would I use the GUI class to make the entire screen one solid color?

I know I can make a small Texture2D and use GUI.Label or GUI.Box, but then how do I stretch the texture to the size specified by the Rect argument? Can I use a GUIStyle to do this?

I suspect this was discussed on the alpha list, but unfortunately I wasn’t paying attention back then. :sweat_smile:

Thanks.

It would be simpler to do this with a GUITexture, stretched across the screen (by setting its scale to 1,1,1)

True, but now that I’ve had a taste of immediate mode gui, I don’t see myself ever going back!

Thanks StarManta.

Make a GUIStyle, assign the solid-colored texture to it’s background property, then draw a fullscreen box with your new GUIStyle