I’ve got the ui canvas>panel>& buttons all set up nicely. I’ve got a start menu and game over menu working correctly, as those are different scenes all together that was a bit easier.
However I have been trying for a few days to get the pause screen to function and I just cannot. I tried a number of different scripts copied from tutorials all over the web.
Here is where I’m at with the script at the moment which is finally not returning any errors.
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class PauseMenu : MonoBehaviour
{
public GameObject pauseMenuCanvas;
void Start ()
{
pauseMenuCanvas.gameObject.SetActive (false);
}
void update ()
{
if (Input.GetKeyDown (KeyCode.Escape)) {
Time.timeScale = 0.0f;
pauseMenuCanvas.SetActive (true);
}
}
public void Continue()
{
Time.timeScale = 1.0f;
pauseMenuCanvas.SetActive (false);
}
However the game simply ignores the whole thing lol. The Canvas named pauseMenuCanvas does get hidden during play. However upon a key press (I tried escape, P, and a few different keys) nothing happens.
Any help or advice will be very helpful.
Thanks in advance to anyone who chimes in ![]()