void Awake() { s_instance = this; DontDestroyOnLoad(gameObject); DontDestroyOnLoad(this); //Another hard code SetCurrentScene(m_mainMenuScene); }
private void SetUpSingleton() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(this.gameObject); } }
void Awake() { s_instance = this; DontDestroyOnLoad(gameObject); DontDestroyOnLoad(this); }