Nebula
Core

PlayerInfo

Who is joining, as the gateway told the worker (NebulaGameMode.OnSpawnPlayer).

generated from the sources
public readonly struct PlayerInfo

Who 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);
ParameterDescription
clientIdThe session id.
nameThe display name.
identityThe identity across sessions.
isBotWhether the client is a headless bot.
claimsForwarded 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.

On this page