public void LoadScene() { if (this.WindowManager == null) { this.WindowManager = WindowManager.Instance; } if (this.SceneManager == null) { this.SceneManager = SceneManager.Instance; } if (this.LoadAdditive) { if (this.WindowManager != null) { this.WindowManager.OpenWindow(this.SceneName); } else { Application.LoadLevelAdditive(this.SceneName); } } else { if (this.SceneManager != null) { this.SceneManager.ChangeScene(this.SceneName); } else { Application.LoadLevel(this.SceneName); } } }
private void Awake() { if (Instance == null) { Instance = this; } // Consider case where content and scene manager are in one scene. this.mainScene = FindObjectOfType<SceneRoot>(); }