Retrieve Number of Room Members When Searching Rooms In MatchMaker
There is a way to add current number of room members to MatchMaker so that when other users find rooms via MatchMaker, they get to see the number of rooms.
Use MatchMaker's Add() function.
The forth argument of matching.Add() function is a map and you may add anything to the map.
This map will be returned to other users when they find match making results, so adding the number of room member in this map will allow other users to see how many users are in each room when they find rooms via MatchMaker.
Example code:
The following example code adds a room to MatchMaker for 60 seconds (maximum length) with the number of room members in a room.
PreviousHow To Use SetOnRoomChange And SetOnRoomChangeByIDNextRoom Message Latency And Server Stress
Last updated