void Awake() { if (instance) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
private void Start() { if (instance == null) { instance = this; } else { Destroy(this); } normalGUI.SetActive(true); pauseGUI.SetActive(false); DontDestroyOnLoad(this); }