void Start() { if (instance) Destroy(gameObject); instance = this; DontDestroyOnLoad(gameObject); OnLevelWasLoaded(0); }
void Start() { if (instance) { Destroy(gameObject); } instance = this; DontDestroyOnLoad(gameObject); OnLevelWasLoaded(0); }
void Start() { if (instance) { Destroy(gameObject); } instance = this; DontDestroyOnLoad(gameObject); ActivateSurroundings(); SceneManager.sceneLoaded += OnLevelLoaded; }
void Start() { if (instance) { Destroy(gameObject); } instance = this; DontDestroyOnLoad(gameObject); #if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 OnLevelWasLoaded(0); #else ActivateSurroundings(); SceneManager.sceneLoaded += OnLevelLoaded; #endif }