Beispiel #1
0
        protected override void OnClick()
        {
            base.OnClick();

            if (EnableBroadcast)
            {
                _manager.StartHostBroadcast();
            }
            else
            {
                _manager.StartHost();
            }
        }
 private void OnServerFound(bool sucess)
 {
     if (sucess)
     {
         _netMan.StartClient();
         _tries = 0;
     }
     else if (!IsVrDevice && (_tries > 3 || (!_disconnected && !_isServer)))
     {
         _netMan.StartHostBroadcast();
         _tries = 0;
     }
     else
     {
         _tries++;
         _netMan.SweepForServer(OnServerFound);
     }
 }