Table of Contents

JoinLobbyByCodeAsync

Methods
public Task<LobbySession> JoinLobbyByCodeAsync(string joinCode, List<CloudAttribute> playerAttr = null, CancellationToken cancellationToken = default)

Join the Lobby via join code.

Parameters
Type Name Description
string joinCode

The join code, as the player typed it.

List<CloudAttribute> playerAttr

Optional parameter to add player attributes to the joined Lobby.

CancellationToken cancellationToken

Optional parameter to cancel the request.

Returns
Type Description
Task<LobbySession>

The joined Lobby.

Remarks

A join code is chosen by whoever creates the Lobby, and is short enough for a player to read out and another to type in. It lasts as long as the Lobby does.

Joining by code too often (currently over 10 a minute) fails with Coherence.Runtime.ErrorCode.LobbyRateLimited, to keep players from guessing codes.

See Also