/// <summary> /// If application was closed we are sending to server signal that we have disconnected. /// </summary> private void OnApplicationQuit() { print("Quitting application. Disconneting from server."); if (FoolNetwork.LocalPlayer.IsInRoom) { FoolNetwork.LeaveRoom(); } FoolNetwork.Disconnect("On Application Quit"); }
private void ExitConfirmedAction(object nextSceneName) { PlayerPrefs.SetString("RememberMe", "false"); FoolNetwork.Disconnect("User log out"); if (OpenSceneAfterExit) { SceneManager.LoadScene((string)nextSceneName); } }