Aloa!
Soo im using this script for pause menu,and it asked me to go assing a button for pause…?Soo i’ve gone to edit-project settings-input made the size 19 and renamed the last box to pause, but then when press escape the pause menu doesnt open.
Pause menu script
using UnityEngine;
using System.Collections;
public class PauseMenu : MonoBehaviour {
public GameObject PauseUI;
private bool paused = false;
void Start () {
PauseUI.SetActive (false);
}
void Update () {
if (Input.GetButtonDown ("Pause")){
paused = !paused;
}
if(paused){
PauseUI.SetActive(true);
Time.timeScale = 0;
}
if(paused){
PauseUI.SetActive(false);
Time.timeScale = 1;
}
}
}