- Home /
Question by
GBT · Aug 20, 2013 at 09:58 PM ·
guibackgroundbox
my GUI.box is transparent
right now my box's background is just invisible, box and label have no difference for me. how do I control the alpha of the box's background?
I've tried using this script:
void OnGUI(){
GUIStyle myStyle = new GUIStyle();
GUI.backgroundColor = Color.black;
GUI.Box(new Rect (100,100,150,30), "Health: "+health, myStyle);
}
and everything I can see is "Health: 100" just like a label...
Comment
Best Answer
Answer by Slobdell · Aug 21, 2013 at 12:06 AM
It's because you're setting the skin to a new blank gui skin. You should create those in the inspector. Take that out, along with the background color part, it isn't doing anything.
Your answer
Follow this Question
Related Questions
Change color of Gui.Box background to solid black 1 Answer
Editing certain words in a single NGUI Text Box 0 Answers
How to render a colored 2D rectangle. 6 Answers
GUIStyle not working on GUI.Button 4 Answers
About GUISkin box background 1 Answer