private void SceneManager_sceneLoaded(Scene scene, LoadSceneMode loadMode) { if (scene.name == "XMenu") { // If we just disconnected from a multiplayer session, then we need to kill the connection here. // Maybe a better place for this, but here works in a pinch. StopCurrentSession(); SceneCleaner.Open(); } }
public static bool Prefix(bool quitToDesktop) { if (!quitToDesktop) { UWE.Utils.lockCursor = false; SceneCleaner.Open(); } else { Application.Quit(); } return(false); }