public IEnumerator StartLoadSequence() { MapData mapData = _data.gameplayData.mapData; if (mapData == null) { SceneManager.LoadScene("MainMenu"); yield return(null); } else { BlockGridController.Singleton.grid = mapData.blockGrid; yield return(StartCoroutine(BlockGridRenderer.Singleton.StartLoadSequence())); //Needs to be done before loading target scene as many things depends on it gameProgressController = new GameObject("Scenario Progress").AddComponent <ScenarioProgressController>(); gameProgressController.scenarioData = _data.gameplayData.scenarioData; gameProgressController.progressData = _data.gameplayData.progressData; yield return(StartCoroutine(LoadTargetScene())); yield return(StartCoroutine(MoveObjectsToTargetScene())); isDone = true; yield return(null); } }
private void Awake() { Singleton = this; }