- Home /
Question by
DirtyFred · Jun 08, 2014 at 06:04 PM ·
guinot-workingguibox
GUI Box not showing!
HI.I am using this code but the bui box is just now showing up.I have the gui layer on my camera.Thanks for help!
function OnGUI()
{
GUI.Box ( Rect ( Screen.width/2 , Screen.height/2 , 100 , 100 ) , " Start" );
}
Comment
In the future please format your code so it is readable. I did it for you this once.
Answer by Jeff-Kesselman · Jun 08, 2014 at 06:06 PM
Your code looks right. My guess is that you haven't attached the component to a scene object, that the component is disabled, or that you are looking at it either in the scene window or in the editor. OnGUI stuff only happens in the Game window at runtime.
Your answer
Follow this Question
Related Questions
Story Text to GUI Boxes 0 Answers
2D Colliders not working 1 Answer
How can I Include string variables in Rich Text? 1 Answer
Glowing/Neon Effect for GUI.Box 1 Answer