Table of Contents

Class SteamManager

Namespace
PopcorningGuineaPig.Engine.Gameplay
Assembly
PopcorningGuineaPig.Engine.dll
public class SteamManager
Inheritance
SteamManager
Inherited Members

Properties

Instance

public static SteamManager Instance { get; }

Property Value

SteamManager

SteamActionsLive

True when a connected controller is actually feeding this manifest's actions. Xbox pads left on XInput stay false so the game keeps the hardware path.

public bool SteamActionsLive { get; }

Property Value

bool

Methods

CreateLobby()

Public lobby, 2 members. Banqi's browser calls this.

public void CreateLobby()

CreateLobby(ELobbyType, int)

public void CreateLobby(ELobbyType kind, int maxMembers)

Parameters

kind ELobbyType
maxMembers int

GetLobbyByIndex(int)

public CSteamID GetLobbyByIndex(int index)

Parameters

index int

Returns

CSteamID

GetLobbyData(CSteamID, string)

public string GetLobbyData(CSteamID lobbyId, string key)

Parameters

lobbyId CSteamID
key string

Returns

string

GetLobbyMemberByIndex(CSteamID, int)

public CSteamID GetLobbyMemberByIndex(CSteamID lobbyId, int index)

Parameters

lobbyId CSteamID
index int

Returns

CSteamID

GetLobbyOwner(CSteamID)

public CSteamID GetLobbyOwner(CSteamID lobbyId)

Parameters

lobbyId CSteamID

Returns

CSteamID

GetNumLobbyMembers(CSteamID)

public int GetNumLobbyMembers(CSteamID lobbyId)

Parameters

lobbyId CSteamID

Returns

int

GetPersonaName()

Returns the local user's Steam persona (display) name, or an empty string when Steam is not initialized.

public string GetPersonaName()

Returns

string

GetPrimarySteamPadName()

Human name for the first connected Steam Input device. Steam Controllers report as Xbox via XInput emulation — this is the real identity for glyphs.

public string? GetPrimarySteamPadName()

Returns

string

GetSteamAvatarRgba(out int, out int)

Returns the local user's medium (64×64) Steam avatar as raw RGBA bytes, or null when Steam is not initialized or the avatar is not yet loaded.

public byte[]? GetSteamAvatarRgba(out int w, out int h)

Parameters

w int

Receives the avatar width in pixels (0 on failure).

h int

Receives the avatar height in pixels (0 on failure).

Returns

byte[]

GetSteamId()

Returns the local user's 64-bit Steam ID as a decimal string, or an empty string when Steam is not initialized.

public string GetSteamId()

Returns

string

GetSteamInputCount()

Steam Input connected controllers (Steam Controller, etc.).

public int GetSteamInputCount()

Returns

int

GetWebApiAuthTicketAsync(string, int)

Requests a Steam Web-API auth ticket for the given identity and returns it hex-encoded (uppercase), suitable for server-side validation via ISteamUserAuth/AuthenticateUserTicket. Returns null on failure, timeout, or when Steam is not initialized. The result is delivered through the registered Steamworks.GetTicketForWebApiResponse_t callback, which is pumped by the existing RunCallbacks(float) loop.

public Task<string?> GetWebApiAuthTicketAsync(string identity = "rothk", int timeoutMs = 5000)

Parameters

identity string

The identity string the server expects (must match the server-side AuthenticateUserTicket identity). Defaults to "rothk".

timeoutMs int

Maximum time to wait for the callback, in milliseconds.

Returns

Task<string>

IsAchievementUnlocked(string)

public bool IsAchievementUnlocked(string achievementId)

Parameters

achievementId string

Returns

bool

IsInitialized()

public bool IsInitialized()

Returns

bool

JoinLobby(CSteamID)

public void JoinLobby(CSteamID lobbyId)

Parameters

lobbyId CSteamID

LeaveLobby(CSteamID)

public void LeaveLobby(CSteamID lobbyId)

Parameters

lobbyId CSteamID

LoadSteamActionManifest(string)

Point Steam Input at the game's action manifest (absolute path). Call after IsInitialized(); false when Steam Input is down or the file is missing.

public bool LoadSteamActionManifest(string absolutePath)

Parameters

absolutePath string

Returns

bool

PollSteamActions(string, IReadOnlyList<string>, IReadOnlyList<string>)

Activate actionSet and snapshot digital edges, analog values, and origins. Call once per frame after RunCallbacks(float).

public void PollSteamActions(string actionSet, IReadOnlyList<string> digital, IReadOnlyList<string> analog)

Parameters

actionSet string
digital IReadOnlyList<string>
analog IReadOnlyList<string>

RequestLobbyList()

public void RequestLobbyList()

RunCallbacks(float)

public void RunCallbacks(float deltaTime = 0)

Parameters

deltaTime float

SetLobbyData(CSteamID, string, string)

public bool SetLobbyData(CSteamID lobbyId, string key, string value)

Parameters

lobbyId CSteamID
key string
value string

Returns

bool

Shutdown()

public void Shutdown()

SteamActionAnalog(string)

public Vector2 SteamActionAnalog(string name)

Parameters

name string

Returns

Vector2

SteamActionDown(string)

public bool SteamActionDown(string name)

Parameters

name string

Returns

bool

SteamActionOrigin(string)

EInputActionOrigin name for the first bound control, or null.

public string? SteamActionOrigin(string name)

Parameters

name string

Returns

string

SteamActionPressed(string)

public bool SteamActionPressed(string name)

Parameters

name string

Returns

bool

UnlockAchievement(string)

public void UnlockAchievement(string achievementId)

Parameters

achievementId string

Events

OnLobbyChatUpdate

public event Action<LobbyChatUpdate_t>? OnLobbyChatUpdate

Event Type

Action<LobbyChatUpdate_t>

OnLobbyCreated

public event Action<LobbyCreated_t>? OnLobbyCreated

Event Type

Action<LobbyCreated_t>

OnLobbyDataUpdate

public event Action<LobbyDataUpdate_t>? OnLobbyDataUpdate

Event Type

Action<LobbyDataUpdate_t>

OnLobbyEntered

public event Action<LobbyEnter_t>? OnLobbyEntered

Event Type

Action<LobbyEnter_t>

OnLobbyMatchList

public event Action<LobbyMatchList_t>? OnLobbyMatchList

Event Type

Action<LobbyMatchList_t>