v1.2.1
Latest
2020.3+

Class LobbyEventCallbacks

A class for you to provide the callbacks you want to be called from the lobby event subscription.

Inheritance
LobbyEventCallbacks
Namespace: Global Namespace
Syntax
public class LobbyEventCallbacks

Events

DataAdded

Event called when lobby data is added on the server.

Declaration
public event Action<Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>>> DataAdded
Event Type
TypeDescription
Action<Dictionary<String, ChangedOrRemovedLobbyValue<DataObject>>>

DataChanged

Event called when lobby data changes on the server.

Declaration
public event Action<Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>>> DataChanged
Event Type
TypeDescription
Action<Dictionary<String, ChangedOrRemovedLobbyValue<DataObject>>>

DataRemoved

Event called when lobby data is removed on the server. Does not cover when the whole data object is completely removed (eg. set to null) For this case, use the DataChanged event instead

Declaration
public event Action<Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>>> DataRemoved
Event Type
TypeDescription
Action<Dictionary<String, ChangedOrRemovedLobbyValue<DataObject>>>

KickedFromLobby

Event called when a kick has been received from the lobby event subscription.

Declaration
public event Action KickedFromLobby
Event Type
TypeDescription
Action

LobbyChanged

Event called when a change has occurred to a lobby on the server.

Declaration
public event Action<ILobbyChanges> LobbyChanged
Event Type
TypeDescription
Action<ILobbyChanges>

LobbyDeleted

Event called when a lobby is deleted.

Declaration
public event Action LobbyDeleted
Event Type
TypeDescription
Action

LobbyEventConnectionStateChanged

Event called when the connection state of the lobby event subscription changes.

Declaration
public event Action<LobbyEventConnectionState> LobbyEventConnectionStateChanged
Event Type
TypeDescription
Action<LobbyEventConnectionState>

PlayerDataAdded

Event called when player data is added on the server.

Declaration
public event Action<Dictionary<int, Dictionary<string, ChangedOrRemovedLobbyValue<PlayerDataObject>>>> PlayerDataAdded
Event Type
TypeDescription
Action<Dictionary<Int32, Dictionary<String, ChangedOrRemovedLobbyValue<PlayerDataObject>>>>

PlayerDataChanged

Event called when player data changes. The outer dictionary is indexed on player indices. The inner dictionary is indexed on the changed data key.

Declaration
public event Action<Dictionary<int, Dictionary<string, ChangedOrRemovedLobbyValue<PlayerDataObject>>>> PlayerDataChanged
Event Type
TypeDescription
Action<Dictionary<Int32, Dictionary<String, ChangedOrRemovedLobbyValue<PlayerDataObject>>>>

PlayerDataRemoved

Event called when player data is removed on the server. Does not cover when the whole data object is completely removed (eg. set to null) For this case, use the PlayerDataChanged event instead

Declaration
public event Action<Dictionary<int, Dictionary<string, ChangedOrRemovedLobbyValue<PlayerDataObject>>>> PlayerDataRemoved
Event Type
TypeDescription
Action<Dictionary<Int32, Dictionary<String, ChangedOrRemovedLobbyValue<PlayerDataObject>>>>

PlayerJoined

Event called when a player join has occurred to a lobby on the server.

Declaration
public event Action<List<LobbyPlayerJoined>> PlayerJoined
Event Type
TypeDescription
Action<List<LobbyPlayerJoined>>

PlayerLeft

Event called when a player leave has occurred to a lobby on the server. (See LobbyPatcher.ApplyPatchesToLobby(Unity.Services.Lobbies.ILobbyChanges,Unity.Services.Lobbies.Models.Lobby)) The indices of the players who left.

Declaration
public event Action<List<int>> PlayerLeft
Event Type
TypeDescription
Action<List<Int32>>