FindOrCreateLobby
Methods
public void FindOrCreateLobby(FindLobbyOptions findOptions, CreateLobbyOptions createOptions, Action<RequestResponse<LobbySession>> onRequestFinished)
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. |
| Action<RequestResponse<LobbySession>> | onRequestFinished | Callback that will be invoked when the request finished. |
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.