photon network server address

Options
Hi everyone,

I try to create a video game and I have some difficulties with photon network. I followed some tutorials and arrive to connect my game to network thanks to PhotonNetwork.ConnectUsingSettings(); but I realize that every times a player connect he is alone in the room even if the room name is the same. So I print the server address using PhotonNetwork.ServerAddress and I realize that every player has a different server address. My question is the following how do I get a unique Photon Cloud server address in order that my players can play together ?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @remi25,

    Thank you for choosing Photon!

    Read this and this.
  • remi25
    Options
    Thank you for your answer. I try to fix thanks to the second link and I verified the all the elements in the matchmaking checklist, everything is ok except the last one, I think the problem is coming from that :

    - If you are implementing asynchronous matchmaking, make sure to use webhooks with proper configuration (enable "AsyncJoin") or use AsyncRandomLobby.

    so I modified my lobby with those lines in onConnectedToMaster :

    numRoom++;
    roomName = "Room" + numRoom;
    RoomOptions roomOptions = new RoomOptions();
    roomOptions.MaxPlayers = maxPlayersPerRoom;
    roomOptions.PlayerTtl = 6000;
    roomOptions.IsOpen = true;
    roomOptions.IsVisible = true;
    roomOptions.CleanupCacheOnLeave = true;
    TypedLobby typedLobby = new TypedLobby("MyLobby", LobbyType.AsyncRandomLobby);
    PhotonNetwork.JoinOrCreateRoom(roomName, roomOptions, typedLobby);

    but it's still not working even if they don't have the same userID, they have the same room name, same lobby, same AppID... so I don't know what to do :neutral:
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @remi25,
    So I print the server address using PhotonNetwork.ServerAddress and I realize that every player has a different server address.
    Is it still the case?

    On each client:

    log the AppId, AppVersion, Region, Cluster, ServerAddress when connected to master server.
    log the room name when joined.

    Compare.
  • remi25
    Options
    It seems that for an unknown reason, sometimes it connects to EU region and some others to RU region even if I live in EU region. So to fix my problem, I add "EU" in fixed region in the photon server settings. Thank you so much.