public static LevelManagementConfigurationGameObject Get() { if (Instance == null) { Instance = FindObjectOfType <LevelManagementConfigurationGameObject>(); } return(Instance); }
private IEnumerator SceneTrasitionOperation(List <AsyncOperation> chunkOperations, LevelZonesID nextZone) { yield return(new WaitForListOfAsyncOperation(chunkOperations)); foreach (var chunkOperation in chunkOperations) { chunkOperation.allowSceneActivation = true; } isNewZoneLoading = false; var nextZoneSceneName = LevelManagementConfigurationGameObject.Get().LevelZonesSceneConfiguration.GetSceneName(nextZone); SceneManager.LoadScene(nextZoneSceneName, LoadSceneMode.Single); yield return(null); SceneManager.SetActiveScene(SceneManager.GetSceneByName(nextZoneSceneName)); }