public static void Connect(string serverAddress, int port, string uniqueGameID) { Connect(serverAddress, port, uniqueGameID, "1.0"); }
public void ConnectToPhoton() { if (PhotonNetwork.connected) { Debug.LogError("cannot switch server when connect"); } Debug.Log(PhotonNetwork.playerName); PhotonNetwork.PhotonServerSettings.ServerAddress = PhotonNetwork.PhotonServerSettings._serverAddressList[MultiplayerDataManager.Instance.PhotonServerSelectIndex]; PhotonNetwork.networkingPeer.CrcEnabled = true; PhotonNetwork.SwitchToProtocol(PhotonNetwork.PhotonServerSettings.ConnectionProtocol); //PhotonNetwork.PhotonServerSettings.ServerPort = 4530; string gameVersion = string.Empty; #if DEVELOPMENT_BUILD gameVersion = FCConst.PHOTON_CONNECT_VERSION_STAGE; #else gameVersion = FCConst.PHOTON_CONNECT_VERSION_LIVE; #endif PhotonNetwork.Connect(PhotonNetwork.PhotonServerSettings.ServerAddress, PhotonNetwork.PhotonServerSettings.ServerPort, PhotonNetwork.PhotonServerSettings.AppID, gameVersion); // PhotonNetwork.ConnectUsingSettings("0.0.1"); }