Pause Menu does not appears

I need to show a pause main when click on pause button, the game is paused right, but menu dont appears.
I cant see what is wrong some help pls?
Thanks :smiley:

if (GUI.Button(Rect(sW-65,10,50,50),pause))
	{

		if(paused == true) {
			Time.timeScale = 0.0;
		}
		else {
			Time.timeScale = 1.0;
		}
	    
		    GUI.BeginGroup(Rect(Screen.width/2 - 150, 50, 300, 750));
		    
		    //the menu background box
		    GUI.Box(Rect(0, 0, 300, 250), "");
		    
		    //logo picture
		    GUI.Label(Rect(15, 10, 300, 68), logoTexture);
		    
		    //pause menu buttons
		    //game resume button
		    if(GUI.Button(Rect(55, 100, 180, 40), "Resume")) {
		    //resume the game
			    Time.timeScale = 1.0;

		    if(GUI.Button(Rect(55, 150, 180, 40), "Main Menu")) {
		    Application.LoadLevel(0);
		    }
		    
		    //quit button
		    if(GUI.Button(Rect(55, 200, 180, 40), "Quit")) {
		    Application.Quit();
		    }
		    
		    //layout end
		    GUI.EndGroup(); 
}
}

Actually you’re wrong, your pause menu DOES show up…but for only one frame. You can’t have all this in the button click menu, that stuff will only appear in the one frame of the button press. You need to reformat so all that code is outside the button press logic. Something like this:

if (GUI.Button(Rect(sW-65,10,50,50),"pause"))
    {
       if(paused) {
         Time.timeScale = 1.0;
         paused = false;
       }else {
         Time.timeScale = 0.0;
         paused = true;
       }
}

if(paused){
     // Show your pause menu here
     // This will be shown on each onGUI() call, not just when the button is pressed

}