using System.Collections; using System.Collections.Generic; using UnityEngine; public class PauseMenu : MonoBehaviour { // Start is called before the first frame update void OnEnable() { Time.timeScale = 0; } public void Continue() { Time.timeScale = 1; gameObject.SetActive(false); } public void Quit() { Time.timeScale = 1; GameObject t =GameObject.Find("SceneManager"); if (t != null) { t.GetComponent<SceneMan>().ChangeScene(0); } } }