invite to room other player

Options
I want to connect to specific region by: "PhotonNetwork.ConnectToRegion((CloudRegionCode)region, Version)" and after that I need connect to specific room by: "PhotonNetwork.JoinRoom(roomName)" how I can make it?

I send invite to Room (through my own tcp server as backEnd service) there information about my region and roomName , other player have this, but can't connect uses command "PhotonNetwork.ConnectToRegion(region, Version)" - this just connect to region, and I dont understand when I should call "PhotonNetwork.JoinRoom(roomName)", because ConnectToRegion dont give me any callBack=( but!!! - if I connect and disconnect by "PhotonNetwork.ConnectUsingSettings(Version)" - then its work for me, and I recive callBack "OnConnectedToMaster()" after then I call "PhotonNetwork.JoinLobby()" and in callBack "OnJoinedLobby()" I can use "PhotonNetwork.JoinRoom(roomName)" - and its work, but need connect and disconnect=(

please help, how I can make invite to room other player.(use Unity+PUN)

Comments

  • Vladimir7i
    Options
    I find answer: In PhotonNetwork.cs in line 1456 (ConnectToRegion) need add this:

    offlineMode = false;
    isMessageQueueRunning = true;
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Vladimir7i,

    Thank you for choosing Photon!

    The answer is simple:
    You cannot make use of Regions, AppID or AppVersion when connecting a self hosted Photon Server.
    Those are meant to be used for Photon Cloud only.

    No need to change anything just use the proper connect method that does not accept a region token.