- Home /
Question by
kensct · Feb 06, 2013 at 06:49 PM ·
guibuttonguicontent
GUI.Button background image
Is there a way to make your button background image above your GUIContent image?
I want to do this so I can have a theme for my buttons but have different images inside the buttons. At the minute the GUIContent image is drawn over the background image obscuring the background image. I know i can correct this by drawing the image before the button, or by changing the way i am using my alpha channels (currently my background image has an alpha channel), but i would prefer to have it the other way round if anyone can tell me how.
This is how i have coded it
if(GUI.Button(new Rect(y*23*boxsizewidth/96,x*23*boxsizewidth/96,buttonsize,buttonsize), new GUIContent(robotbasemenutext[x*4+y],""+(x*4+y+1))))
Thanks for any help
Kenneth.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613092247im_/https://answers.unity.com/themes/thub/images/avi.jpg)