BASIC GUI HELP

I need assistance in trying to create a button that simply displays a label. I have changed the Application.LoadLevel in the code below to GUI.Label(…) but it does not display anything.

/* Example level loader */

function OnGUI () {
// Make a background box
GUI.Box (Rect (10,10,100,90), “Loader Menu”);

// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if (GUI.Button (Rect (20,40,80,20), “Level 1”)) {
Application.LoadLevel (1);
}

// Make the second button.
if (GUI.Button (Rect (20,70,80,20), “Level 2”)) {
Application.LoadLevel (2);
}
}

Hello :smile:

try this:

var displayLabel : boolean;

function Start(){
    displayLabel = false;
}

function OnGUI(){
    if(displayLabel){
         GUI.Label(Rect (10, 40, 200,30),"This is a label activated by Level 1 button")
    }
    if (GUI.Button (Rect (20,40,80,20), "Level 1")) { 
        displayLabel = true;
    }
}

Hope it helps! :wink:

thx that was very helpeful