コード例 #1
0
        /// <summary>
        /// in progress, not fully working
        /// </summary>
        public void PingRegions()
        {
            ModalWindow.gameObject.SetActive(true);

            RegionListLoadingFeedback.text = "Connecting to NameServer...";
            _regionPingProcessActive       = true;
            if (debug)
            {
                Debug.Log("PunCockpit:PingRegions:ConnectToNameServer");
            }

            _lbc = new LoadBalancingClient(PhotonNetwork.NetworkingClient.ExpectedProtocol);
            _lbc.AddCallbackTarget(this);


            _lbc.StateChanged += OnStateChanged;

            _lbc.AppId = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime;
            _lbc.ConnectToNameServer();
        }