Пример #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");
 }
Пример #2
0
 private void OnActionConfirmed()
 {
     FoolNetwork.LeaveRoom();
     SceneManager.LoadScene("Main menu");
 }