Class SteamManager
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public class SteamManager
Properties
|
Edit this page
View Source
Instance
Declaration
public static SteamManager Instance { get; }
Property Value
|
Edit this page
View Source
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.
Declaration
public bool SteamActionsLive { get; }
Property Value
Methods
|
Edit this page
View Source
CreateLobby()
Declaration
public void CreateLobby()
|
Edit this page
View Source
GetLobbyByIndex(int)
Declaration
public CSteamID GetLobbyByIndex(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
| Type |
Description |
| CSteamID |
|
|
Edit this page
View Source
GetLobbyData(CSteamID, string)
Declaration
public string GetLobbyData(CSteamID lobbyId, string key)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
| string |
key |
|
Returns
|
Edit this page
View Source
GetLobbyMemberByIndex(CSteamID, int)
Declaration
public CSteamID GetLobbyMemberByIndex(CSteamID lobbyId, int index)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
| int |
index |
|
Returns
| Type |
Description |
| CSteamID |
|
|
Edit this page
View Source
GetLobbyOwner(CSteamID)
Declaration
public CSteamID GetLobbyOwner(CSteamID lobbyId)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
Returns
| Type |
Description |
| CSteamID |
|
|
Edit this page
View Source
GetNumLobbyMembers(CSteamID)
Declaration
public int GetNumLobbyMembers(CSteamID lobbyId)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
Returns
|
Edit this page
View Source
GetPersonaName()
Returns the local user's Steam persona (display) name, or an empty string
when Steam is not initialized.
Declaration
public string GetPersonaName()
Returns
|
Edit this page
View Source
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.
Declaration
public string? GetPrimarySteamPadName()
Returns
|
Edit this page
View Source
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.
Declaration
public byte[]? GetSteamAvatarRgba(out int w, out int h)
Parameters
| Type |
Name |
Description |
| int |
w |
Receives the avatar width in pixels (0 on failure).
|
| int |
h |
Receives the avatar height in pixels (0 on failure).
|
Returns
|
Edit this page
View Source
GetSteamId()
Returns the local user's 64-bit Steam ID as a decimal string, or an empty
string when Steam is not initialized.
Declaration
public string GetSteamId()
Returns
|
Edit this page
View Source
Steam Input connected controllers (Steam Controller, etc.).
Declaration
public int GetSteamInputCount()
Returns
|
Edit this page
View Source
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.
Declaration
public Task<string?> GetWebApiAuthTicketAsync(string identity = "rothk", int timeoutMs = 5000)
Parameters
| Type |
Name |
Description |
| string |
identity |
The identity string the server expects (must match the server-side
AuthenticateUserTicket identity). Defaults to "rothk".
|
| int |
timeoutMs |
Maximum time to wait for the callback, in milliseconds.
|
Returns
|
Edit this page
View Source
IsAchievementUnlocked(string)
Declaration
public bool IsAchievementUnlocked(string achievementId)
Parameters
| Type |
Name |
Description |
| string |
achievementId |
|
Returns
|
Edit this page
View Source
IsInitialized()
Declaration
public bool IsInitialized()
Returns
|
Edit this page
View Source
JoinLobby(CSteamID)
Declaration
public void JoinLobby(CSteamID lobbyId)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
|
Edit this page
View Source
LeaveLobby(CSteamID)
Declaration
public void LeaveLobby(CSteamID lobbyId)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
|
Edit this page
View Source
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.
Declaration
public bool LoadSteamActionManifest(string absolutePath)
Parameters
| Type |
Name |
Description |
| string |
absolutePath |
|
Returns
|
Edit this page
View Source
PollSteamActions(string, IReadOnlyList<string>, IReadOnlyList<string>)
Activate actionSet and snapshot digital edges, analog values, and origins.
Call once per frame after RunCallbacks(float).
Declaration
public void PollSteamActions(string actionSet, IReadOnlyList<string> digital, IReadOnlyList<string> analog)
Parameters
|
Edit this page
View Source
RequestLobbyList()
Declaration
public void RequestLobbyList()
|
Edit this page
View Source
RunCallbacks(float)
Declaration
public void RunCallbacks(float deltaTime = 0)
Parameters
| Type |
Name |
Description |
| float |
deltaTime |
|
|
Edit this page
View Source
SetLobbyData(CSteamID, string, string)
Declaration
public bool SetLobbyData(CSteamID lobbyId, string key, string value)
Parameters
| Type |
Name |
Description |
| CSteamID |
lobbyId |
|
| string |
key |
|
| string |
value |
|
Returns
|
Edit this page
View Source
Shutdown()
Declaration
|
Edit this page
View Source
SteamActionAnalog(string)
Declaration
public Vector2 SteamActionAnalog(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
Returns
|
Edit this page
View Source
SteamActionDown(string)
Declaration
public bool SteamActionDown(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
Returns
|
Edit this page
View Source
SteamActionOrigin(string)
EInputActionOrigin name for the first bound control, or null.
Declaration
public string? SteamActionOrigin(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
Returns
|
Edit this page
View Source
SteamActionPressed(string)
Declaration
public bool SteamActionPressed(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
Returns
|
Edit this page
View Source
UnlockAchievement(string)
Declaration
public void UnlockAchievement(string achievementId)
Parameters
| Type |
Name |
Description |
| string |
achievementId |
|
Events
|
Edit this page
View Source
OnLobbyChatUpdate
Declaration
public event Action<LobbyChatUpdate_t>? OnLobbyChatUpdate
Event Type
| Type |
Description |
| Action<LobbyChatUpdate_t> |
|
|
Edit this page
View Source
OnLobbyCreated
Declaration
public event Action<LobbyCreated_t>? OnLobbyCreated
Event Type
| Type |
Description |
| Action<LobbyCreated_t> |
|
|
Edit this page
View Source
OnLobbyDataUpdate
Declaration
public event Action<LobbyDataUpdate_t>? OnLobbyDataUpdate
Event Type
| Type |
Description |
| Action<LobbyDataUpdate_t> |
|
|
Edit this page
View Source
OnLobbyEntered
Declaration
public event Action<LobbyEnter_t>? OnLobbyEntered
Event Type
| Type |
Description |
| Action<LobbyEnter_t> |
|
|
Edit this page
View Source
OnLobbyMatchList
Declaration
public event Action<LobbyMatchList_t>? OnLobbyMatchList
Event Type
| Type |
Description |
| Action<LobbyMatchList_t> |
|