How to Close Room If there is 4 player

How to Close Room If there is 4 player in room and if 4 then create new room for other player


  • If you're using Unity, just go into Unity and when you create a room set up custom room properties.
    PhotonNetwork.CreateRoom (null, new RoomOptions () { MaxPlayers = 4 }, null);
  • Thanks for this but once the game is started how to close the room
  • I just told you... If you want a max of 4 players, once it reaches the max limit people can no longer join it.

    Now if you mean "hey 4 players joined, start the round" and then "1 player leaves" to prevent others from joining after that, I'd probably say CustomRoomProperties.
  • I did just find this, might work for you. = false;.
  • and how to close room when 10 or 20 second is over so that other player should not join and even if there is less then 4 player and 20 second is over then start the game
  • Thanks for above replay but when implementing above code i had stuck
    so can i get a full code
  • code for GameManager and Launcher which has max player limit and count down timer and if count down timer exceed then start with player which had join on count down timer
    and once start game no one should enter the game
Sign In or Register to comment.