a player goes into the room which is invisible!

I am working 2d running game!

I made the connecting to room only using JoinRandomRoom. when game is stated, room max players is changed and visible is changed to 'invisible' to prevent other players come in middle of the game.

I thought it works well, but here is the problem...

In the middle of the game, if one players disconnected and came back to lobby and go to room, JoinRandomRoom function makes a player go into the started room which is the players was in and the game is already middle of the game.

i don't want to interrupt by players in the game which is started. I mean i hope room to close when started.
What should i do in this situation?
the room properties or player properties affects to find a random room? or just photon network remember the info of the room the players was in.

In this situation, if player disconnected middle of the game, then he cannot go to any other room do any other game until the game (he was in) is finished because JoinRandomRoom send the player to that room again.

Please help me~ TT


  • Hi @Senma,

    you can try to close the room after the game has been started. This can be done by the MasterClient by using PhotonNetwork.room.IsOpen = false;. If the room is closed, other clients shouldn't be able to join this room.
  • @Christian_Simon ,
    oh i saw this now :p
    yeap. that was the problem!
    it worked great. thanks! :D:D
Sign In or Register to comment.