private void OnLateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { // Bind multiplayer session events MpSession.SetUp(); MpModeSelection.SetUp(); // UI setup PluginUi.SetUp(); // Initial state update GameStateManager.HandleUpdate(); }
public static bool Prefix(MultiplayerModeSelectionFlowCoordinator __instance, MultiplayerModeSelectionViewController viewController, MultiplayerModeSelectionViewController.MenuButton menuButton) { // Make sure any overrides are cleared when we're going to connect or host MpConnect.ClearMasterServerOverride(); if (menuButton == MenuButton.GameBrowser) { // When the "GameBrowser" button is clicked, bypass the game's own incomplete code & open our view instead PluginUi.LaunchServerBrowser(); return(false); } else { // Going to a non-serverbrowser part of the online menu MpModeSelection.WeInitiatedConnection = false; } return(true); }