if (Input.GetButtonUp(“Fire1”)) {
AudioListener.pause = true;
if(!paused) {
//GUI.Box(new Rect(0,0,Screen.width,Screen.height),“”);
Time.timeScale = 0;
paused = true;
}
else {
Time.timeScale = 1;
paused = false;
AudioListener.pause = false;
}
}
I cannot instantiate a new GUI.Box inside Update(). But if I put that code in OnGUI, it doesn’t work(not run every frame). How can I make a menu show up? I was thinking of Event listeners, but is there something more intuitive?