Exemplo n.º 1
0
 /// <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");
 }
Exemplo n.º 2
0
    private void ExitConfirmedAction(object nextSceneName)
    {
        PlayerPrefs.SetString("RememberMe", "false");

        FoolNetwork.Disconnect("User log out");

        if (OpenSceneAfterExit)
        {
            SceneManager.LoadScene((string)nextSceneName);
        }
    }