PlayerInfo
Who is joining, as the gateway told the worker (NebulaGameMode.OnSpawnPlayer).
Nebula · Packages/com.1by3.nebula/Runtime/Core/NebulaGameMode.cspublic readonly struct PlayerInfoWho is joining, as the gateway told the worker (NebulaGameMode.OnSpawnPlayer).
Constructors
PlayerInfo
public PlayerInfo(ulong clientId, string name, string identity, bool isBot);
public PlayerInfo(ulong clientId, string name, string identity, bool isBot, IReadOnlyDictionary<string, string> claims);| Parameter | Description |
|---|---|
clientId | The session id. |
name | The display name. |
identity | The identity across sessions. |
isBot | Whether the client is a headless bot. |
claims | Forwarded token claims; null for none. |
Fields
ClientId
public readonly ulong ClientId;The player's session id: unique across every gateway of the mesh, and kept across a reconnection with a session token (the player continues with the same pawn). A new session gets a new id.
Name
public readonly string Name;The player's display name: the verified token's NebulaConfig.NameClaim when the mesh sets one and the token has it, otherwise the name the client asked for.
Identity
public readonly string Identity;The player's identity across sessions (PlayerIdentity): from the OpenID token they presented, or the anonymous token the gateway issued them.
IsBot
public readonly bool IsBot;The client is a headless bot.
Properties
Claims
public IReadOnlyDictionary<string, string> Claims { get; }The claims of the player's verified sign-in token that the mesh forwards (NebulaConfig.ForwardedClaims), every value a string. Empty, never null, for anonymous players and when nothing is forwarded. The pawn carries the same claims as NetworkIdentity.OwnerClaims.