Class SteamManager
public class SteamManager
- Inheritance
-
SteamManager
- Inherited Members
Properties
Instance
public static SteamManager Instance { get; }
Property Value
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
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
kindELobbyTypemaxMembersint
GetLobbyByIndex(int)
public CSteamID GetLobbyByIndex(int index)
Parameters
indexint
Returns
- CSteamID
GetLobbyData(CSteamID, string)
public string GetLobbyData(CSteamID lobbyId, string key)
Parameters
lobbyIdCSteamIDkeystring
Returns
GetLobbyMemberByIndex(CSteamID, int)
public CSteamID GetLobbyMemberByIndex(CSteamID lobbyId, int index)
Parameters
lobbyIdCSteamIDindexint
Returns
- CSteamID
GetLobbyOwner(CSteamID)
public CSteamID GetLobbyOwner(CSteamID lobbyId)
Parameters
lobbyIdCSteamID
Returns
- CSteamID
GetNumLobbyMembers(CSteamID)
public int GetNumLobbyMembers(CSteamID lobbyId)
Parameters
lobbyIdCSteamID
Returns
GetPersonaName()
Returns the local user's Steam persona (display) name, or an empty string when Steam is not initialized.
public string GetPersonaName()
Returns
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
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
wintReceives the avatar width in pixels (0 on failure).
hintReceives 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
GetSteamInputCount()
Steam Input connected controllers (Steam Controller, etc.).
public int GetSteamInputCount()
Returns
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
identitystringThe identity string the server expects (must match the server-side AuthenticateUserTicket identity). Defaults to
"rothk".timeoutMsintMaximum time to wait for the callback, in milliseconds.
Returns
IsAchievementUnlocked(string)
public bool IsAchievementUnlocked(string achievementId)
Parameters
achievementIdstring
Returns
IsInitialized()
public bool IsInitialized()
Returns
JoinLobby(CSteamID)
public void JoinLobby(CSteamID lobbyId)
Parameters
lobbyIdCSteamID
LeaveLobby(CSteamID)
public void LeaveLobby(CSteamID lobbyId)
Parameters
lobbyIdCSteamID
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
absolutePathstring
Returns
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
actionSetstringdigitalIReadOnlyList<string>analogIReadOnlyList<string>
RequestLobbyList()
public void RequestLobbyList()
RunCallbacks(float)
public void RunCallbacks(float deltaTime = 0)
Parameters
deltaTimefloat
SetLobbyData(CSteamID, string, string)
public bool SetLobbyData(CSteamID lobbyId, string key, string value)
Parameters
Returns
Shutdown()
public void Shutdown()
SteamActionAnalog(string)
public Vector2 SteamActionAnalog(string name)
Parameters
namestring
Returns
SteamActionDown(string)
public bool SteamActionDown(string name)
Parameters
namestring
Returns
SteamActionOrigin(string)
EInputActionOrigin name for the first bound control, or null.
public string? SteamActionOrigin(string name)
Parameters
namestring
Returns
SteamActionPressed(string)
public bool SteamActionPressed(string name)
Parameters
namestring
Returns
UnlockAchievement(string)
public void UnlockAchievement(string achievementId)
Parameters
achievementIdstring
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>