//Jimmy Vegas Unity Tutorial //This script will be for your pause menu using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityStandardAssets.Characters.FirstPerson; public class InventoryMenu : MonoBehaviour { public bool invOpen = false; public GameObject invMenu; public GameObject thePlayer; void Update () { if (Input.GetButtonDown("Cancel")) { if (invOpen == false) { Time.timeScale = 0; invOpen = true; Cursor.visible = true; invMenu.SetActive(true); thePlayer.GetComponent().enabled = false; } else { thePlayer.GetComponent().enabled = true; invMenu.SetActive(false); Cursor.visible = false; invOpen = false; Time.timeScale = 1; } } } }