AcceptLobbyInviteAsync
Methods
public Task<LobbySession> AcceptLobbyInviteAsync(LobbyInvite invite, List<CloudAttribute> playerAttr = null, LobbyReservations reservations = null, CancellationToken cancellationToken = default)
Join a Lobby via invitation.
Parameters
| Type | Name | Description |
|---|---|---|
| LobbyInvite | invite | The invite handed by OnLobbyInviteReceived. |
| List<CloudAttribute> | playerAttr | Optional parameter to add player attributes to the joined Lobby. |
| LobbyReservations | reservations | Optional slots to reserve for the rest of your party, joining you and reserving them in a single step. Fails with Coherence.Runtime.ErrorCode.LobbyFull, without joining, if the lobby can't fit everyone. Fails with Coherence.Runtime.ErrorCode.LobbyReservationsNotAllowed if it would reserve more new slots than the lobby's MaxReservationsPerRequest. Players already in the lobby, or who already have a reservation, are skipped and don't count, so every member of the party can send the same reservations. |
| CancellationToken | cancellationToken | Optional parameter to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<LobbySession> | The Lobby that the player joined. |
Remarks
The invite only admits you. Players you reserve slots for still need an invite of their own, or the lobby's password.