Example #1
0
 private void StartGame()
 {
     #if UNITY_EDITOR
     CurrentLevelIndex = SceneManager.GetAllScenes()[0].buildIndex; //Obtener index de la otra escena
     if (CurrentLevelIndex == 0)
     {
         LoadMainMenu();
     }
     else if (CurrentLevelIndex == MainMenuIndex)
     {
         AfterLoadMainMenu();
     }
     else if (CurrentLevelIndex >= FirstLevelIndex)
     {
         Debug.LogWarning("Reloading - Ignore previous console messages");
         Debug.ClearDeveloperConsole();
         RestartLevel(); // Reload everything to properly load GameManager before Level
     }
     LoadingScreenManager.HideIntro();
     #else
     LoadMainMenu();
     #endif
 }