Problem with connecting to specific region

Options
Hello!

I've come to a complete halt with this problem as I can't even connect the clients to the same room because they always tend to choose different regions when deciding for themselves. Therefore I use PhotonNetwork.ConnectToRegion("eu") right after PhotonNetwork.ConnectUsingSettings(). This have worked multiple times before but won't now for some reason. Now I get an error stating that it can't connect to the region because it has to be in the "disconnected" state which I totally understand. However when I remove the PhotonNetwork.ConnectUsingSettings() and replace it with ConnectToRegion I get another error stating "OperationResponse 230: ReturnCode: 32767 (Invalid application id). Parameters: {} Server: NameServer Address: ns.exitgames.com:5058". I don't understand what I have to do here to get this to work. If I cannot get the clients to connect to the same region I can't continue my work.

Thanks in advance!

Comments

  • JimNew
    Options
    Hi and Happy New Year. (and sorry for my english)

    I had the same problem 2 yeaks ago and i solved it with this:

    1) In Unity Go to: Windows ---> Photon Unity Networking ---> PUN Wizard.
    2) Click on: Locate PhotonServer Settings.
    3) In the Inspector: expand the Server/Cloud Settings
    4) In Fixed Region write: eu

    and in my code i wrote this:

    // i use this for gameversion...
    private string g_gameversion = "0.0.1";


    //--- inside the: private void Start()

    if (PhotonNetwork.IsConnected == false)
    {
    PhotonNetwork.GameVersion = g_gameversion;
    PhotonNetwork.PhotonServerSettings.AppSettings.FixedRegion = "eu";
    PhotonNetwork.ConnectUsingSettings();
    }


    I use this and the connection works fine.
    Some times with the command only :
    PhotonNetwork.PhotonServerSettings.AppSettings.FixedRegion = "eu";
    didnt work... and i dont know why.

    But with this way i solved this problem.

    Try it and tell me if you are ok. (and sorry for my english again).

    Happy New Year 2021.

    Best regards
    JimNew
  • Demonitized
    edited December 2020
    Options
    Hello!

    Happy new years and thanks for the quick response! Your solution worked like
    a charm and I'm happy to say that both my clients connect to the same region now.
    Though for some reason they still won't see each others rooms.

    Edit:
    Found the remaining issue. I just forgot to connect to a lobby aswell
  • JimNew
    Options
    I am happy to hear it.
    I know the problem and I remember how much confused I was with this.

    The knoweledge is for all... and we are getting better when we are sharing it.

    (sorry for my english)

    Happy New Year.
    Best Regards.
    JimNew