Esempio n. 1
0
        public static LevelManagementConfigurationGameObject Get()
        {
            if (Instance == null)
            {
                Instance = FindObjectOfType <LevelManagementConfigurationGameObject>();
            }

            return(Instance);
        }
Esempio n. 2
0
        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));
        }