Table of Contents

FindOrCreateLobbyAsync

Methods
public Task<LobbySession> FindOrCreateLobbyAsync(FindLobbyOptions findOptions, CreateLobbyOptions createOptions, CancellationToken cancellationToken = default)

Endpoint to do matchmaking and find a suitable Lobby. If no suitable Lobby is found, one will be created using the CreateLobbyOptions.

Parameters
Type Name Description
FindLobbyOptions findOptions

Options that will be used to try to find a suitable Lobby.

CreateLobbyOptions createOptions

Options that will be used to create a Lobby if no suitable Lobby is found. Reservations also applies to a found Lobby.

CancellationToken cancellationToken

Optional parameter to cancel the request.

Returns
Type Description
Task<LobbySession>
Remarks

With Reservations, you join a found Lobby and slots are reserved for the rest of your party in a single step. Lobbies that can't fit the whole party, or whose MaxReservationsPerRequest is too low, are skipped. When none qualifies, a new Lobby is created with the slots reserved.

Creation flags such as MaxReservationsPerRequest only apply to a created Lobby. A found Lobby keeps its own; read them off LobbyData.