IMultiplayerService class


IMultiplayerService class is used for querying rooms.

Methods

ListRooms

Lists public rooms.

Takes ListRoomsQuery for pagination and criteria. If null value is passed, returns first 100 public rooms by default.

CollectionResult<RoomInfo> ListRooms(ListRoomsQuery query = null);
CollectionResult<RoomInfo> ListRooms<T>(ListRoomsQuery<T> query = null);

Examples

List the first public room

var query = new ListRoomsQuery
{
    Skip = 0,
    Take = 1
};

var result = await service.ListRooms(query);

if(result.IsSuccessful && result.Data.Any())
{
    var roomInfo = result.Data.First();
    Debug.Log("Room name: " + roomInfo.Name);
}

results matching ""

    No results matching ""