Class RosterUpdate

Namespace
Unity.Multiplayer.Core

A change to a roster, as a server sends it: the players added or changed, and the seats freed.

public sealed class RosterUpdate
Inheritance
RosterUpdate
Inherited Members

Constructors

RosterUpdate(bool, IReadOnlyList<NetPlayer>, IReadOnlyList<int>)

An update.

public RosterUpdate(bool full, IReadOnlyList<NetPlayer> players, IReadOnlyList<int> removed)

Parameters

full bool

True when players is the whole roster (a peer drops every seat not in it).

players IReadOnlyList<NetPlayer>

The players added or changed (all of them when full).

removed IReadOnlyList<int>

The seats freed (ignored when full).

Properties

Full

True when Players is the whole roster.

public bool Full { get; }

Property Value

bool

IsEmpty

True when an incremental update carries nothing.

public bool IsEmpty { get; }

Property Value

bool

Players

The players added or changed (all of them when Full).

public IReadOnlyList<NetPlayer> Players { get; }

Property Value

IReadOnlyList<NetPlayer>

Removed

The seats freed.

public IReadOnlyList<int> Removed { get; }

Property Value

IReadOnlyList<int>

Methods

Snapshot(IReadOnlyList<NetPlayer>)

The whole roster, for a peer that has none yet (a new or returning connection).

public static RosterUpdate Snapshot(IReadOnlyList<NetPlayer> players)

Parameters

players IReadOnlyList<NetPlayer>

Returns

RosterUpdate

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.