PUN2无法连接本地服务器

PUN2无法连接本地服务器

使用PhotonNetwork.ConnectToMaster()无法正常连接到本地服务器,使用以下代码

            PhotonNetwork.PhotonServerSettings.AppSettings.UseNameServer = false;
            PhotonNetwork.PhotonServerSettings.AppSettings.Server = "127.0.0.1";
            PhotonNetwork.PhotonServerSettings.AppSettings.Port = 5055;
            PhotonNetwork.PhotonServerSettings.AppSettings.FixedRegion = null;
            PhotonNetwork.ConnectUsingSettings();

或者 在PhotonServerSettings中设置IP和端口号后使用

           PhotonNetwork.ConnectUsingSettings();

你可能感兴趣的:(每日笔记)