How do I show a list of players in a room without joining the room?

fre5
fre5
Hi, first of all I apologize if this has been mentioned. I spent a whole day yesterday searching for a question with the answer and had no luck. I really need to figure out how I can fetch a list of players inside a room WITHOUT joining the room. In my case, this would actually save the bandwidth from players having to constantly get in and out of rooms. And of course, I would limit the player count in any rooms created from RoomInfo room.PlayerCount parameter since PhotonNetwork.PlayersList only work in rooms. I want to be able to show the players while I scroll through multiple rooms in the lobby before a player decide to join it. PhotonNetwork.PlayerList is not possible because you have to be in the room, can someone please show me the workaround, maybe using RPC? or CustomProperties that can fetch the list of players in the room while OnRoomListUpdate is getting called. I think it's an important feature to have. Please help.

Best Answer

Answers

  • Sorry, I accidentally clicked accepted answer. What I want is to get a list of player names without joining the room. Not just the count of players in each rooms.

  • CountOfPlayersOnMaster would give you the count of players currently looking for a room.