Bewerken

Lobby.Leave

Method (1 of 2)

Request one local user to leave the lobby.

public void Leave(PFEntityKey localUser)
parameter description
localUser A value to indicate if a specific local user should leave the lobby.

Remarks (1 of 2)

This operation should only fail if the client is experiencing persistent internet connectivity issues. Under these circumstances, the client loses their active connection to the lobby and remote lobby members see their LobbyMemberConnectionStatus as LobbyMemberConnectionStatus.Disconnected. The members experiencing connectivity issues remain as members of the lobby unless the lobby owner forcibly removes them.

This is an asynchronous operation. The local users removed from the lobby via this method won't be removed in the lists returned by GetMembers until the asynchronous operation successfully completes and a Multiplayer.OnLobbyMemberRemoved is provided by ProcessLobbyStateChanges.


Method (2 of 2)

Request one local user to leave the lobby.

public void Leave(PlayFabAuthenticationContext localUser)
parameter description
localUser A value to indicate if a specific local user should leave the lobby.

Remarks (2 of 2)

This operation should only fail if the client is experiencing persistent internet connectivity issues. Under these circumstances, the client loses their active connection to the lobby and remote lobby members see their LobbyMemberConnectionStatus as LobbyMemberConnectionStatus.Disconnected. The members experiencing connectivity issues remain as members of the lobby unless the lobby owner forcibly removes them.

This is an asynchronous operation. The local users removed from the lobby via this method won't be removed in the lists returned by GetMembers until the asynchronous operation successfully completes and a Multiplayer.OnLobbyMemberRemoved is provided by ProcessLobbyStateChanges.

See Also