// Start is called before the first frame update private void Awake() { if (instance != null && instance != this) { gameObject.SetActive(false); } else { instance = this; DontDestroyOnLoad(gameObject); } }
// Start is called before the first frame update private void Awake() { instance = this; DontDestroyOnLoad(gameObject); }