Late room joining problem

Options
Hi,
In my game, I show a list of rooms that available to be joined. I made my game such that as soon as the player clicks on a room button, first the level loads and then the the player joins the room ( so that every other player instantiate in the same game scene and not in the menu scene of the game). Everything goes fine until there are max -1 players in the game (eg. 7/8). let say, more than one players are trying to join the game now. only one player will be able to join the game and others will be stuck after loading the scene (as the room reached its max limit). Can someone suggest a possible solution for this ?

Comments

  • Divyansh
    Divyansh
    edited May 2019
    Options
    Ok, so I found a solution for this.

    Basically what you can do is, join the room first and set

    PhotonNetwork.IsMessageQueueRunning = false; // do this in "OnRoomJoined()" callback otherwise currPlayerCount of the room won't get updated

    now load your desired scene and when the scene is loaded, set

    PhotonNetwork.IsMessageQueueRunning = true;

    now everyone those who are already in that game will instantiate in your game scene.