Ejemplo n.º 1
0
 // Sets up the game for joining lobby specified in invitation that was received and accepted while the game was running
 void SetUpInviteInGame(string connectionString)
 {
     Debug.Log("Setting up the game for joining lobby from game invite accepted from the game");
     pendingLobbyID = new GalaxyID(ParseLobbyIDFromConnectionString(connectionString));
     if (pendingLobbyID.IsValid())
     {
         if (SceneManager.GetActiveScene().name == "MainMenu")
         {
             Debug.Log("Main menu scene is already loaded, joining lobby");
             JoinLobby();
         }
         else
         {
             Debug.Log("Main menu scene not loaded, subscribing to SceneManager.sceneLoaded event and loading MainMenu scene");
             SceneManager.sceneLoaded += OnSceneLoaded;
             SceneController.Instance.LoadScene(SceneController.SceneName.MainMenu, true);
         }
     }
 }