v1.2.1
Latest
2020.3+

Interface ILobbyChanges

An interface providing a set of changes to apply to a lobby model.

Namespace: Unity.Services.Lobbies
Syntax
public interface ILobbyChanges

Properties

AvailableSlots

Declaration
ChangedLobbyValue<int> AvailableSlots { get; }
Property Value
TypeDescription
ChangedLobbyValue<Int32>

Data

The changes to the lobby’s data, if it has changed.

Declaration
ChangedOrRemovedLobbyValue<Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>>> Data { get; }
Property Value
TypeDescription
ChangedOrRemovedLobbyValue<Dictionary<String, ChangedOrRemovedLobbyValue<DataObject>>>

HasPassword

The change for if HasPassword has changed.

Declaration
ChangedLobbyValue<bool> HasPassword { get; }
Property Value
TypeDescription
ChangedLobbyValue<Boolean>

HostId

The changes to the lobby’s host ID, if it has changed.

Declaration
ChangedLobbyValue<string> HostId { get; }
Property Value
TypeDescription
ChangedLobbyValue<String>

IsLocked

The change for if the lobby is locked, if it has changed.

Declaration
ChangedLobbyValue<bool> IsLocked { get; }
Property Value
TypeDescription
ChangedLobbyValue<Boolean>

IsPrivate

The change for if the lobby is private, if it has changed.

Declaration
ChangedLobbyValue<bool> IsPrivate { get; }
Property Value
TypeDescription
ChangedLobbyValue<Boolean>

LastUpdated

The time the lobby changes occurred.

Declaration
ChangedLobbyValue<DateTime> LastUpdated { get; }
Property Value
TypeDescription
ChangedLobbyValue<DateTime>

LobbyDeleted

Whether or not the lobby was deleted. True if the lobby was deleted. False if it is still available.

Declaration
bool LobbyDeleted { get; }
Property Value
TypeDescription
Boolean

MaxPlayers

The change to the maximum number of players in the lobby, if it has changed.

Declaration
ChangedLobbyValue<int> MaxPlayers { get; }
Property Value
TypeDescription
ChangedLobbyValue<Int32>

Name

The change to the lobby’s name, if it has changed.

Declaration
ChangedLobbyValue<string> Name { get; }
Property Value
TypeDescription
ChangedLobbyValue<String>

PlayerData

The changes to player’s data, if any have changed.

Declaration
ChangedLobbyValue<Dictionary<int, LobbyPlayerChanges>> PlayerData { get; }
Property Value
TypeDescription
ChangedLobbyValue<Dictionary<Int32, LobbyPlayerChanges>>

PlayerJoined

A list of players that have joined, if any.

Declaration
ChangedLobbyValue<List<LobbyPlayerJoined>> PlayerJoined { get; }
Property Value
TypeDescription
ChangedLobbyValue<List<LobbyPlayerJoined>>

PlayerLeft

A list of players that have left, if any.

Declaration
ChangedLobbyValue<List<int>> PlayerLeft { get; }
Property Value
TypeDescription
ChangedLobbyValue<List<Int32>>

Version

The changes to the lobby’s version, if it has changed.

Declaration
ChangedLobbyValue<int> Version { get; }
Property Value
TypeDescription
ChangedLobbyValue<Int32>

Methods

ApplyToLobby(Lobby)

Takes a lobby and a change applicator to update a given lobby in-place. If LobbyDeleted is true, no changes will be applied and a warning will be logged.

Declaration
void ApplyToLobby(Lobby lobby)
Parameters
TypeNameDescription
Lobbylobby

The lobby model to apply the changes to.