- Home /
My GUI Label isn't showing
So I'm trying to let a label show up when a button is pressed but the label doesn't show. What am I doing wrong? I'm not getting any errors. Here is my code:
function OnGUI ()
{
if (GUI.Button(Rect(Screen.width*0.56,Screen.height - 100 ,80,80),"Info"))
{
GUI.Label(Rect(Screen.width*0.5,Screen.height*0.5,1000,1000),ProductionHourText);
}
}
Comment
Best Answer
Answer by mirkobon · Dec 11, 2014 at 04:29 PM
Already found the problem I had to make a Button instead of a label and I created a boolean variable
Your answer
Follow this Question
Related Questions
Reference imported Texture Asset for GUILayout.Label... 0 Answers
How to make 3D Text fade in and out? 3 Answers
GUI.Lable slowdown problem 0 Answers
Changing displayed label in OnGUI from another function 0 Answers
GUILayout Sort Problem 1 Answer