Example #1
0
 public static void SwitchToProtocol(ConnectionProtocol cp)
 {
     if (networkingPeer.UsedProtocol != cp)
     {
         try {
             networkingPeer.Disconnect();
             networkingPeer.StopThread();
         } catch {
         }
         networkingPeer = new NetworkingPeer(photonMono, string.Empty, cp);
         Debug.Log("Protocol switched to: " + cp);
     }
 }