SessionPlayer
public sealed class SessionPlayerNamespace SideHustle
Added in 3.0.0
One player in the current session (see API.Players, API.PlayerJoined, API.PlayerLeft). The same object stays in API.Players for as long as the player is in the session; DisplayName and IsHost are refreshed about twice a second. Since 3.0.0.
Properties
Section titled “Properties”SteamId
Section titled “SteamId”public ulong SteamId { get; }Added in 3.0.0
The player’s Steam id (id64). 0 for the local player when Steam could not be read.
DisplayName
Section titled “DisplayName”public string DisplayName { get; internal set; }Added in 3.0.0
The name other players see. For the local player this is the session alias when one is set, else the Steam persona. For a remote player in a World session it is the replicated in-game name (which carries their alias) once their character has spawned; before that, and in a MenuSpace session, it is their Steam persona.
IsHost
Section titled “IsHost”public bool IsHost { get; internal set; }Added in 3.0.0
True for the lobby owner. In singleplayer the local player is not the host.
IsLocal
Section titled “IsLocal”public bool IsLocal { get; }Added in 3.0.0
True for the player on this machine.
Methods
Section titled “Methods”ToString
Section titled “ToString”public override string ToString()Added in 3.0.0
“Name (steamId)”, for logs.