- Home /
GUI Window background image.
I am trying to use a GUI window as part of an in game interface. I want to put an image as the background of the window, but cant seem to figure out how. I tried GUI.DrawTexture, thinking that would work, and it does for the most part, except the image is not constrained to the window. It overlaps the borders. I would just resize it to fit, but the rounded corners of the gui window means I have to leave borders, or overlap the corners.
Can anyone point me to the correct function to draw an image in this window that is constrained to the borders of the window?
Any help is appreciated.
-Larry
Answer by Eric5h5 · Apr 10, 2010 at 01:42 PM
The only way I know of to do that is to make a GUIStyle for the window where the background image is part of the actual window background.
Thanks. That worked, but adds a lot of extra work, to make the image look like a complete window. Again, thanks for your help.
Your answer
Follow this Question
Related Questions
GUI controls inside a window are disabled for unknown reason 1 Answer
Unity GUI Texture with file path 1 Answer
Draw a pixel and change its color in code 1 Answer
GUI information 0 Answers