/// <param name="onComplete">Called once the request completes, regardless of success or failure.</param>
publicasyncTaskLeaveLobbyAsync(stringlobbyId)
{
m_RemoteLobby=null;
m_RemoteLobby=null;
// Lobbies will automatically delete the lobby if unoccupied, so we don't need to take further action.
}
}
privatefloatm_heartbeatTime=0;
privateconstintk_heartbeatPeriodMS=8000;// The heartbeat must be rate-limited to 5 calls per 30 seconds. We'll aim for longer in case periods don't align.
privateconstintm_LobbyUpdateTime=500;
asyncTaskGetLobbyLoop()
{
//In this sample we only use the loop internally, when we've joined. Only after we have joined or created a lobby can we poll for updates.
//Since you only need the ID, there might be a use case to get the lobby before joining it, since you can get the ID's from Querying
privateconstintk_heartbeatPeriodMS=8000;// The heartbeat must be rate-limited to 5 calls per 30 seconds. We'll aim for longer in case periods don't align.
/// <summary>
/// Lobby requires a periodic ping to detect rooms that are still active, in order to mitigate "zombie" lobbies.