private void Awake() { DontDestroyOnLoad(this); if (instance == null) { instance = this; } else { Destroy(this); } }
private void Awake() { if (instance) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(this); } }