JoinLobbyAsync
Methods
public Task<LobbySession> JoinLobbyAsync(LobbyData lobby, List<CloudAttribute> playerAttr = null, string password = null, LobbyReservations reservations = null, CancellationToken cancellationToken = default)
Join the supplied Lobby.
Parameters
| Type | Name | Description |
|---|---|---|
| LobbyData | lobby | The lobby to join. |
| List<CloudAttribute> | playerAttr | Optional parameter to add player attributes to the joined Lobby. |
| string | password | Optional parameter to specify the Password to join a private 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> |
See Also
public Task<LobbySession> JoinLobbyAsync(LobbyData lobby, List<CloudAttribute> playerAttr, string password, CancellationToken cancellationToken)
Join the supplied Lobby.
Parameters
| Type | Name | Description |
|---|---|---|
| LobbyData | lobby | The lobby to join. |
| List<CloudAttribute> | playerAttr | Optional parameter to add player attributes to the joined Lobby. |
| string | password | Optional parameter to specify the Password to join a private Lobby. |
| CancellationToken | cancellationToken | Optional parameter to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<LobbySession> |
See Also
public Task<LobbySession> JoinLobbyAsync(string lobbyId, List<CloudAttribute> playerAttr = null, string password = null, LobbyReservations reservations = null, CancellationToken cancellationToken = default)
Join a coherence Cloud Lobby.
Parameters
| Type | Name | Description |
|---|---|---|
| string | lobbyId | Id of the lobby to join. |
| List<CloudAttribute> | playerAttr | Optional parameter to add player attributes to the joined Lobby. |
| string | password | Optional parameter to specify the password to join a private 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> |