Class Seat
- Namespace
- Unity.Multiplayer.Core
A snapshot of one player's slot on the server, kept across reconnects: the same PlayerToken always gets the same Index back while the seat lives.
public sealed class Seat
- Inheritance
-
Seat
- Inherited Members
Remarks
Immutable; SeatRegistry hands out a new snapshot whenever a seat changes.
Properties
ClientId
The client id of the connection in the seat, or of the last one when Status is not Occupied.
public ulong ClientId { get; }
Property Value
Color
The colour the player last connected with.
public PlayerColor Color { get; }
Property Value
DisplayName
The name the player last connected with.
public string DisplayName { get; }
Property Value
HeldUntil
While Held: the time (on the registry's clock) the seat is freed. Otherwise 0.
public double HeldUntil { get; }
Property Value
Index
The seat number, from 0 to capacity - 1. Stable for the seat's life.
public int Index { get; }
Property Value
IsOccupied
True while a connected client sits in the seat.
public bool IsOccupied { get; }
Property Value
PlayerToken
The player token that owns the seat.
public string PlayerToken { get; }
Property Value
Reconnects
How many times the player has come back to this seat.
public int Reconnects { get; }
Property Value
Status
Occupied, held for a reconnect, or released.
public SeatStatus Status { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.