コード例 #1
0
    public void GetRoomsInfo(Action <List <RoomInfo> > callback)
    {
        this.callback = callback;

        client = new LoadBalancingClient();
        client.AddCallbackTarget(this);
        client.StateChanged += OnStateChanged;
        client.AppId         = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime;
        client.AppVersion    = PhotonNetwork.NetworkingClient.AppVersion;
        client.ConnectToRegionMaster("us");
    }
コード例 #2
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();
        }