Ejemplo n.º 1
0
 void OnDestroy()
 {
     observers          = null;
     currentRoomPlayers = null;
     if (wsClient != null)
     {
         wsClient.tokenSource.Cancel();
     }
     if (udpClient != null)
     {
         udpClient.Dispose();
     }
 }
 void OnDestroy()
 {
     observers          = null;
     currentRoomPlayers = null;
     if (wsClient != null)
     {
         wsClient.tokenSource.Cancel();
     }
     if (udpClient != null)
     {
         udpClient.Dispose();
     }
     if (Application.platform == RuntimePlatform.OSXPlayer ||
         Application.platform == RuntimePlatform.WindowsPlayer ||
         Application.platform == RuntimePlatform.LinuxPlayer)
     {
         Environment.Exit(0);
     }
 }