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
fullboolTrue when
playersis the whole roster (a peer drops every seat not in it).playersIReadOnlyList<NetPlayer>The players added or changed (all of them when
full).removedIReadOnlyList<int>The seats freed (ignored when
full).
Properties
Full
True when Players is the whole roster.
public bool Full { get; }
Property Value
IsEmpty
True when an incremental update carries nothing.
public bool IsEmpty { get; }
Property Value
Players
The players added or changed (all of them when Full).
public IReadOnlyList<NetPlayer> Players { get; }
Property Value
Removed
The seats freed.
public IReadOnlyList<int> Removed { get; }
Property Value
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
playersIReadOnlyList<NetPlayer>
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.