Steamworks Library

Helpers for integrating with the Steamworks API


OmegaLeo.HelperLib.Steamworks

AchievementManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
AchievementManager

Provides helper methods for unlocking and querying Steam achievements.


Example:
var achievements = new AchievementManager(logger);
achievements.UnlockAchievement("ACH_WIN_ONE_GAME");
UnlockAchievement

Attempts to unlock the provided achievement and store user stats.


Returns: void
Parameters:
  • achievementId: string
Attribute Args:
  • achievementId: Steam achievement identifier to unlock.
IsAchievementUnlocked

Checks whether a Steam achievement is currently unlocked.


Returns: bool
Parameters:
  • achievementId: string
  • unlocked: out bool
Attribute Args:
  • achievementId: Steam achievement identifier to check.
  • unlocked: True when the achievement is unlocked.

SteamApiCallResult

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamApiCallResult

The completed result of an asynchronous Steam API call (SteamAPICall_t).


ApiCall

The SteamAPICall_t handle this result belongs to.


CallbackId

The callback id of the result struct (for example SteamCallbackIds.SubmitItemUpdateResult).


IoFailure

True when Steam reported a failure fetching the result, or Steam was shut down before it completed. The payload is then not valid.


Payload

Raw bytes of the native callback struct, copied before Steam frees it.


ReadByte

Reads a byte at the given offset, or 0 when out of range.


Returns: byte
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadBoolean

Reads a one-byte C++ bool at the given offset.


Returns: bool
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadInt32

Reads a 32-bit signed integer at the given offset, or 0 when out of range.


Returns: int
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadUInt32

Reads a 32-bit unsigned integer at the given offset, or 0 when out of range.


Returns: uint
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadUInt64

Reads a 64-bit unsigned integer at the given offset, or 0 when out of range.


Returns: ulong
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadString

Reads a NUL-terminated UTF-8 char array field.


Returns: string
Parameters:
  • offset: int
  • maxLength: int
Attribute Args:
  • offset: Byte offset of the char array.
  • maxLength: Size of the char array in the native struct.

SteamAppsManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamAppsManager

Provides ownership, DLC and language queries from ISteamApps.


Example:
var apps = SteamManager.Instance.Apps;
if (apps.BIsSubscribedApp(5498630)) { /* user owns the demo */ }
var language = apps.GetCurrentGameLanguage(); // e.g. "english"
BIsSubscribed

Checks whether the current user owns (is subscribed to) the running app.


Returns: bool
BIsSubscribedApp

Checks whether the current user owns the given app, for example a related demo or another of your games.


Returns: bool
Parameters:
  • appId: uint
Attribute Args:
  • appId: AppId to check.
BIsDlcInstalled

Checks whether the user owns the given DLC and it is installed.


Returns: bool
Parameters:
  • appId: uint
Attribute Args:
  • appId: DLC AppId.
BIsAppInstalled

Checks whether the given app is installed on this machine.


Returns: bool
Parameters:
  • appId: uint
Attribute Args:
  • appId: AppId to check.
GetCurrentGameLanguage

Gets the language the user selected for this game in Steam (API language code such as "english"), or an empty string when unavailable.


Returns: string
GetAvailableGameLanguages

Gets a comma-separated list of the languages the game supports.


Returns: string
GetAppBuildId

Gets the Steam build id of the installed depot.


Returns: int

SteamCallbackData

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamCallbackData

A Steam callback received through manual dispatch.


CallbackId

The callback id (k_iCallback) of the native struct.


SteamUser

The HSteamUser the callback was posted for.


Payload

Raw bytes of the native callback struct, copied before Steam frees it.


ReadByte

Reads a byte at the given offset, or 0 when out of range.


Returns: byte
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadBoolean

Reads a one-byte C++ bool at the given offset.


Returns: bool
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadInt32

Reads a 32-bit signed integer at the given offset, or 0 when out of range.


Returns: int
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadUInt32

Reads a 32-bit unsigned integer at the given offset, or 0 when out of range.


Returns: uint
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadUInt64

Reads a 64-bit unsigned integer at the given offset, or 0 when out of range.


Returns: ulong
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadString

Reads a NUL-terminated UTF-8 char array field.


Returns: string
Parameters:
  • offset: int
  • maxLength: int
Attribute Args:
  • offset: Byte offset of the char array.
  • maxLength: Size of the char array in the native struct.

SteamCallbackDispatcher

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamCallbackDispatcher

Runs the Steam manual callback dispatch loop and delivers callbacks and async call results. Access it through SteamManager.Instance.Callbacks; it is pumped by SteamManager.Update().


Example:
var steam = SteamManager.Instance;
steam.Callbacks.OverlayActivated += overlay => Pause(overlay.Active);
using var sub = steam.Callbacks.Subscribe(SteamCallbackIds.GameOverlayActivated, data => Log(data.ReadBoolean(0)));
var result = await steam.Callbacks.WaitForCallResultAsync(apiCallHandle);
UsesLargeCallbackPack

True when Steam callback structs use 8-byte packing (Windows). Linux, Steam Deck and macOS use 4-byte packing, which moves 64-bit fields in some structs.


IsManualDispatchActive

True when manual dispatch is running, so callbacks and async call results are delivered.


PendingCallResultCount

Number of async call handles still waiting for a result.


Subscribe

Subscribes to every callback with the given id. The handler receives a copy of the raw payload. Dispose the returned object to unsubscribe.


Returns: IDisposable
Parameters:
  • callbackId: int
  • handler: Action<SteamCallbackData>
Attribute Args:
  • callbackId: Callback id (k_iCallback), see SteamCallbackIds.
  • handler: Called from SteamManager.Update() for each matching callback.
Unsubscribe

Removes a handler added with Subscribe.


Returns: bool
Parameters:
  • callbackId: int
  • handler: Action<SteamCallbackData>
Attribute Args:
  • callbackId: Callback id the handler was registered for.
  • handler: The handler to remove.
RegisterCallResult

Registers a handler for the result of an async Steam API call. The handler runs once, from SteamManager.Update(). Returns false when the handle is invalid or manual dispatch is not active.


Returns: bool
Parameters:
  • apiCall: ulong
  • onCompleted: Action<SteamApiCallResult>
Attribute Args:
  • apiCall: SteamAPICall_t handle returned by an async Steam API method.
  • onCompleted: Called with the result (check IoFailure).
WaitForCallResultAsync

Returns a task that completes with the result of an async Steam API call. Keep calling SteamManager.Update() while waiting. Faults with InvalidOperationException when manual dispatch is not active.


Returns: Task<SteamApiCallResult>
Parameters:
  • apiCall: ulong
  • cancellationToken: CancellationToken
Attribute Args:
  • apiCall: SteamAPICall_t handle returned by an async Steam API method.
  • cancellationToken: Cancels the wait (the Steam call itself keeps running).

SteamCallbackIds

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamCallbackIds

Steamworks callback ids (the k_iCallback value of each callback struct) used by this library.


GameOverlayActivated

GameOverlayActivated_t (k_iSteamFriendsCallbacks + 31).


SteamApiCallCompleted

SteamAPICallCompleted_t (k_iSteamUtilsCallbacks + 3). Handled internally to deliver async call results.


SteamUgcQueryCompleted

SteamUGCQueryCompleted_t (k_iSteamUGCCallbacks + 1), the result of SendQueryUGCRequest.


CreateItemResult

CreateItemResult_t (k_iSteamUGCCallbacks + 3), the result of CreateItem.


SubmitItemUpdateResult

SubmitItemUpdateResult_t (k_iSteamUGCCallbacks + 4), the result of SubmitItemUpdate.


SteamCallbackPayload

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamCallbackPayload

Base class for a copied Steam callback payload with little-endian field readers. Offsets follow the native struct layout for the current platform (see SteamCallbackDispatcher.UsesLargeCallbackPack).


Payload

Raw bytes of the native callback struct, copied before Steam frees it.


ReadByte

Reads a byte at the given offset, or 0 when out of range.


Returns: byte
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadBoolean

Reads a one-byte C++ bool at the given offset.


Returns: bool
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadInt32

Reads a 32-bit signed integer at the given offset, or 0 when out of range.


Returns: int
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadUInt32

Reads a 32-bit unsigned integer at the given offset, or 0 when out of range.


Returns: uint
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadUInt64

Reads a 64-bit unsigned integer at the given offset, or 0 when out of range.


Returns: ulong
Parameters:
  • offset: int
Attribute Args:
  • offset: Byte offset in the payload.
ReadString

Reads a NUL-terminated UTF-8 char array field.


Returns: string
Parameters:
  • offset: int
  • maxLength: int
Attribute Args:
  • offset: Byte offset of the char array.
  • maxLength: Size of the char array in the native struct.

SteamControllerManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamControllerManager

Provides access checks for ISteamController.


SteamFriendsManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamFriendsManager

Provides access checks for ISteamFriends.


GetFriendCount

Gets the friend count filtered by Steam friend flags.


Returns: int
Parameters:
  • friendFlags: int
Attribute Args:
  • friendFlags: Bitmask value matching Steam EFriendFlags.
GetFriendPersonaName

Gets the persona name of a friend by SteamID64.


Returns: string
Parameters:
  • steamIdFriend: ulong
Attribute Args:
  • steamIdFriend: Friend SteamID64.
ActivateGameOverlayInviteDialog

Opens the Steam invite dialog for a lobby.


Returns: void
Parameters:
  • steamIdLobby: ulong
Attribute Args:
  • steamIdLobby: Lobby SteamID64.
SetRichPresence

Sets a rich presence key/value pair for the local user.


Returns: bool
Parameters:
  • key: string
  • value: string
Attribute Args:
  • key: Rich presence key.
  • value: Rich presence value.
ClearRichPresence

Clears all rich presence values for the local user.


Returns: void
GetFriendRichPresence

Gets a rich presence value for a specific friend.


Returns: string
Parameters:
  • steamIdFriend: ulong
  • key: string
Attribute Args:
  • steamIdFriend: Friend SteamID64.
  • key: Rich presence key.
InviteUserToGame

Invites a friend to the current game session using a connect string.


Returns: bool
Parameters:
  • steamIdFriend: ulong
  • connectString: string
Attribute Args:
  • steamIdFriend: Friend SteamID64.
  • connectString: Game connect string passed through Steam invite.

SteamGameCoordinatorManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamGameCoordinatorManager

Provides access checks for ISteamGameCoordinator.


SteamGameServerManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamGameServerManager

Provides access checks for ISteamGameServer.


SteamGameServerStatsManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamGameServerStatsManager

Provides access checks for ISteamGameServerStats.


SteamHtmlSurfaceManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamHtmlSurfaceManager

Provides access checks for ISteamHTMLSurface.


SteamInputManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamInputManager

Provides access checks for ISteamInput.


Init

Initializes Steam Input for the application.


Returns: bool
Parameters:
  • explicitlyCallRunFrame: bool
Attribute Args:
  • explicitlyCallRunFrame: Set true when your game will manually call RunFrame each frame.
Shutdown

Shuts down Steam Input.


Returns: bool
RunFrame

Runs a Steam Input frame update.


Returns: void

SteamInventoryManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamInventoryManager

Provides access checks for ISteamInventory.


LoadItemDefinitions

Requests latest inventory item definitions from Steam.


Returns: bool
GetAllItems

Requests all inventory items and returns a result handle.


Returns: bool
Parameters:
  • inventoryResultHandle: out int
Attribute Args:
  • inventoryResultHandle: Inventory result handle to use with additional inventory API calls.
DestroyResult

Releases an inventory result handle returned from Steam Inventory API calls.


Returns: void
Parameters:
  • inventoryResultHandle: int
Attribute Args:
  • inventoryResultHandle: Inventory result handle to release.

SteamManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamManager

Manages Steamworks initialization, callback dispatch, and shutdown for applications using the Steam API.


Example:
SteamManager.ConfigureLogger(logger);
SteamManager.ConfigureLibraryPath(pluginFolder);
if (SteamManager.RestartAppIfNecessary(480)) { Quit(); return; }
var steam = SteamManager.Instance;
steam.OverlayActivated += overlay => Pause(overlay.Active);
steam.Update();
Instance

Singleton access to the Steam manager.


IsSteamworksInitialized

Indicates whether Steamworks is initialized and ready for API calls.


InitErrorMessage

The reason initialization failed, as reported by SteamAPI_InitFlat when available. Empty after a successful init.


Callbacks

Provides callback subscriptions and async call results through manual dispatch.


Apps

Provides access to ISteamApps bindings (ownership, DLC, language).


Ugc

Provides access to Steam Workshop (UGC) helper operations.


RemotePlay

Provides access to Steam Remote Play helper operations.


Controller

Provides access to ISteamController bindings.


Friends

Provides access to ISteamFriends bindings.


GameCoordinator

Provides access to ISteamGameCoordinator bindings.


GameServer

Provides access to ISteamGameServer bindings.


GameServerStats

Provides access to ISteamGameServerStats bindings.


HtmlSurface

Provides access to ISteamHTMLSurface bindings.


Input

Provides access to ISteamInput bindings.


Inventory

Provides access to ISteamInventory bindings.


Matchmaking

Provides access to ISteamMatchmaking bindings.


MatchmakingServers

Provides access to ISteamMatchmakingServers bindings.


Music

Provides access to ISteamMusic bindings.


Parties

Provides access to ISteamParties bindings.


RemoteStorage

Provides access to ISteamRemoteStorage bindings.


Screenshots

Provides access to ISteamScreenshots bindings.


UserStats

Provides access to ISteamUserStats bindings.


Utils

Provides access to ISteamUtils bindings.


Video

Provides access to ISteamVideo bindings.


ConfigureLogger

Configures the logger used by Steamworks helper classes.


Returns: void
Parameters:
  • logger: ILogger
Attribute Args:
  • logger: ILogger instance to receive Steamworks logs.
ConfigureLibraryPath

Adds a folder (or full file path) to search first for the Steam API native library (steam_api64.dll / libsteam_api.so / libsteam_api.dylib). Can be called several times; paths are tried in order, then the default locations. Must be called before Instance or RestartAppIfNecessary. Returns false when the library is already loaded.


Returns: bool
Parameters:
  • directoryOrFile: string
Attribute Args:
  • directoryOrFile: Folder containing the native library, or the full path to it.
Example:
SteamManager.ConfigureLibraryPath(Path.Combine(gameDataFolder, "Plugins", "x86_64"));
ConfigureManualDispatch

Enables or disables manual callback dispatch (enabled by default). When disabled, Update() uses SteamAPI_RunCallbacks and no callback events or async call results are delivered. Must be called before Instance.


Returns: bool
Parameters:
  • enabled: bool
Attribute Args:
  • enabled: True to use manual dispatch.
RestartAppIfNecessary

Calls SteamAPI_RestartAppIfNecessary. Returns true when the game was not launched through Steam and Steam is relaunching it: quit immediately in that case. Call it before Instance and before ConfigureAppId (steam_appid.txt, and possibly the SteamAppId environment variable, suppress the relaunch). Returns false when the native library cannot be loaded.


Returns: bool
Parameters:
  • appId: uint
Attribute Args:
  • appId: Your Steam AppId.
Example:
if (SteamManager.RestartAppIfNecessary(480))
{
    Quit();
    return;
}
ConfigureAppId

Configures the Steam AppId used during initialization by setting the SteamAppId/SteamGameId environment variables. Does not write steam_appid.txt. Must be called before accessing the singleton instance.


Returns: bool
Parameters:
  • appId: uint
Attribute Args:
  • appId: Steam application identifier.
ConfigureAppId

Configures the Steam AppId used during initialization. Optionally writes steam_appid.txt next to the executable and in the working directory (useful in editors and development builds; leave false for shipped builds). Must be called before accessing the singleton instance.


Returns: bool
Parameters:
  • appId: uint
  • writeSteamAppIdFile: bool
Attribute Args:
  • appId: Steam application identifier.
  • writeSteamAppIdFile: True to also write steam_appid.txt.
Update

Executes Steamworks callbacks (manual dispatch, or SteamAPI_RunCallbacks when manual dispatch is unavailable) and delivers events and async call results. Call every frame from your game loop's main thread.


Returns: void
Shutdown

Shuts down Steamworks and clears the initialized state. Pending async call results complete with IoFailure = true.


Returns: void
GetSteamName

Gets the current Steam persona name. Returns "Player" when Steamworks is unavailable.


Returns: string

SteamMatchmakingManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamMatchmakingManager

Provides access checks for ISteamMatchmaking.


RequestLobbyList

Requests a lobby list and returns a Steam API call handle.


Returns: ulong
AddRequestLobbyListResultCountFilter

Sets the maximum number of lobbies returned by RequestLobbyList.


Returns: void
Parameters:
  • maxResults: int
Attribute Args:
  • maxResults: Maximum number of lobby results.
CreateLobby

Creates a lobby and returns a Steam API call handle.


Returns: ulong
Parameters:
  • lobbyType: int
  • maxMembers: int
Attribute Args:
  • lobbyType: Numeric ELobbyType value.
  • maxMembers: Maximum lobby member count.
JoinLobby

Joins a lobby by SteamID64 and returns a Steam API call handle.


Returns: ulong
Parameters:
  • steamIdLobby: ulong
Attribute Args:
  • steamIdLobby: Lobby SteamID64.
LeaveLobby

Leaves a lobby by SteamID64.


Returns: void
Parameters:
  • steamIdLobby: ulong
Attribute Args:
  • steamIdLobby: Lobby SteamID64.
GetNumLobbyMembers

Gets the number of members currently in a lobby.


Returns: int
Parameters:
  • steamIdLobby: ulong
Attribute Args:
  • steamIdLobby: Lobby SteamID64.

SteamMatchmakingServersManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamMatchmakingServersManager

Provides access checks for ISteamMatchmakingServers.


SteamMusicManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamMusicManager

Provides access checks for ISteamMusic.


IsEnabled

Checks whether Steam Music is enabled.


Returns: bool
IsPlaying

Checks whether Steam Music is currently playing.


Returns: bool
Play

Starts Steam Music playback.


Returns: void
Pause

Pauses Steam Music playback.


Returns: void
PlayNext

Advances to the next music track.


Returns: void
PlayPrevious

Moves to the previous music track.


Returns: void
GetVolume

Gets Steam Music volume (0..1 range).


Returns: float
SetVolume

Sets Steam Music volume (0..1 range).


Returns: void
Parameters:
  • volume: float
Attribute Args:
  • volume: New volume value.

SteamOverlayActivated

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamOverlayActivated

Data from GameOverlayActivated_t, raised when the Steam overlay opens or closes.


Active

True when the overlay was opened, false when it was closed.


UserInitiated

True when the user opened the overlay (as opposed to the game or Steam).


AppId

The AppId the overlay was activated for.


SteamPartiesManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamPartiesManager

Provides access checks for ISteamParties.


SteamRemotePlayManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamRemotePlayManager

Provides helper methods for Steam Remote Play session inspection.


Example:
var remotePlay = SteamManager.Instance.RemotePlay;
var sessionCount = remotePlay.GetSessionCount();
GetSessionCount

Gets the number of active Remote Play sessions for the current user.


Returns: uint
GetSessionId

Gets a Remote Play session ID by zero-based session index.


Returns: uint
Parameters:
  • sessionIndex: int
Attribute Args:
  • sessionIndex: Zero-based index into the active sessions list.
GetSessionSteamId

Gets the SteamID for the remote user in a session.


Returns: ulong
Parameters:
  • sessionId: uint
Attribute Args:
  • sessionId: Remote Play session ID.
GetSessionClientName

Gets the client device name for a remote session.


Returns: string
Parameters:
  • sessionId: uint
Attribute Args:
  • sessionId: Remote Play session ID.
GetSessionClientFormFactor

Gets the client form-factor value for a session (matches Steam's ESteamDeviceFormFactor numeric values).


Returns: int
Parameters:
  • sessionId: uint
Attribute Args:
  • sessionId: Remote Play session ID.
TryGetSessionClientResolution

Gets the streaming client resolution for a session.


Returns: bool
Parameters:
  • sessionId: uint
  • resolutionX: out int
  • resolutionY: out int
Attribute Args:
  • sessionId: Remote Play session ID.
  • resolutionX: Width output.
  • resolutionY: Height output.

SteamRemoteStorageManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamRemoteStorageManager

Provides access checks for ISteamRemoteStorage.


FileExists

Checks whether a file exists in Steam Remote Storage.


Returns: bool
Parameters:
  • fileName: string
Attribute Args:
  • fileName: Cloud file path/name.
GetFileCount

Gets the number of files in Steam Remote Storage for the current app/user context.


Returns: int
IsCloudEnabledForApp

Checks whether Steam Cloud is enabled for this app.


Returns: bool
FileWrite

Writes a byte array to a Steam Cloud file.


Returns: bool
Parameters:
  • fileName: string
  • data: byte[]
Attribute Args:
  • fileName: Cloud file path/name.
  • data: Raw file bytes to write.
FileRead

Reads a Steam Cloud file into a byte array.


Returns: bool
Parameters:
  • fileName: string
  • data: out byte[]
Attribute Args:
  • fileName: Cloud file path/name.
  • data: Output file bytes when read succeeds.
FileDelete

Deletes a Steam Cloud file.


Returns: bool
Parameters:
  • fileName: string
Attribute Args:
  • fileName: Cloud file path/name.
GetFileSize

Gets file size in bytes for a Steam Cloud file.


Returns: int
Parameters:
  • fileName: string
Attribute Args:
  • fileName: Cloud file path/name.

SteamScreenshotsManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamScreenshotsManager

Provides access checks for ISteamScreenshots.


AddScreenshotToLibrary

Adds an existing screenshot to the Steam screenshot library.


Returns: uint
Parameters:
  • fileNameJpg: string
  • fileNameThumbnail: string
  • width: int
  • height: int
Attribute Args:
  • fileNameJpg: Screenshot image path.
  • fileNameThumbnail: Thumbnail path.
  • width: Image width.
  • height: Image height.
TriggerScreenshot

Triggers an in-game screenshot event.


Returns: void
HookScreenshots

Enables or disables screenshot hooks for custom handling.


Returns: void
Parameters:
  • hook: bool
Attribute Args:
  • hook: True to hook screenshots.
IsScreenshotsHooked

Checks whether screenshot hooks are currently enabled.


Returns: bool

SteamUgcCreateItemResult

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUgcCreateItemResult

Result of ISteamUGC::CreateItem (CreateItemResult_t).


Result

Numeric EResult value (1 = OK).


PublishedFileId

The new Workshop item ID. Pass it to StartItemUpdate to upload content.


UserNeedsToAcceptWorkshopLegalAgreement

True when the user must accept the Workshop legal agreement before the item becomes visible.


IoFailure

True when the result could not be retrieved; the other fields are then not valid.


IsSuccess

True when the result was retrieved and EResult is OK.


SteamUgcItemUpdateOptions

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUgcItemUpdateOptions

Declarative update payload for workshop item editing convenience APIs.


Title

Workshop item title.


Description

Workshop item description.


Metadata

Workshop item metadata string.


Visibility

Numeric ERemoteStoragePublishedFileVisibility value.


Tags

Workshop tag list.


ContentFolder

Absolute path to workshop content folder.


PreviewFile

Absolute path to workshop preview image.


SteamUgcItemUpdateSession

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUgcItemUpdateSession

Fluent helper for editing and submitting a workshop item update.


Submit

Submits the fluent update session and returns a Steam API call handle.


Returns: ulong
Parameters:
  • changeNote: string
  • failedStep: out string
Attribute Args:
  • changeNote: Changelog note for this update.
  • failedStep: Name of the failed step if submission returns 0.
Submit

Submits the fluent update session and calls onCompleted with the upload result from SteamManager.Update().


Returns: ulong
Parameters:
  • changeNote: string
  • onCompleted: Action<SteamUgcSubmitItemUpdateResult>
  • failedStep: out string
Attribute Args:
  • changeNote: Changelog note for this update.
  • onCompleted: Called once with the upload result.
  • failedStep: Name of the failed step if submission returns 0.

SteamUgcManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUgcManager

Provides helper methods for common Steam Workshop (UGC) operations such as queries and subscriptions.


Example:
var ugc = new SteamUgcManager();
var items = ugc.GetSubscribedItems();
BeginUpdateSession

Begins a fluent UGC update session for an existing workshop item.


Returns: SteamUgcItemUpdateSession
Parameters:
  • consumerAppId: uint
  • publishedFileId: ulong
Attribute Args:
  • consumerAppId: Your game AppId.
  • publishedFileId: Existing workshop item ID.
ApplyItemUpdate

Applies all non-null/non-empty fields from a UGC update options object to an existing update handle.


Returns: bool
Parameters:
  • updateHandle: ulong
  • options: SteamUgcItemUpdateOptions
  • failedStep: out string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • options: Options object containing fields to apply.
  • failedStep: Name of the field that failed to apply, if any.
UpdateItem

Convenience method that starts an item update, applies option fields, and submits the update in one call.


Returns: ulong
Parameters:
  • consumerAppId: uint
  • publishedFileId: ulong
  • options: SteamUgcItemUpdateOptions
  • changeNote: string
  • failedStep: out string
Attribute Args:
  • consumerAppId: Your game AppId.
  • publishedFileId: Existing workshop item ID.
  • options: Options object containing fields to update.
  • changeNote: Changelog note for submission.
  • failedStep: Name of the failed step when the call returns 0.
UpdateItem

Starts an item update, applies option fields, submits it, and calls onCompleted with the upload result from SteamManager.Update().


Returns: ulong
Parameters:
  • consumerAppId: uint
  • publishedFileId: ulong
  • options: SteamUgcItemUpdateOptions
  • changeNote: string
  • onCompleted: Action<SteamUgcSubmitItemUpdateResult>
  • failedStep: out string
Attribute Args:
  • consumerAppId: Your game AppId.
  • publishedFileId: Existing workshop item ID.
  • options: Options object containing fields to update.
  • changeNote: Changelog note for submission.
  • onCompleted: Called once with the upload result.
  • failedStep: Name of the failed step when the call returns 0.
CreateItem

Creates a new Workshop item and returns a Steam API call handle.


Returns: ulong
Parameters:
  • consumerAppId: uint
  • fileType: uint
Attribute Args:
  • consumerAppId: Your game AppId.
  • fileType: Numeric EWorkshopFileType value.
CreateItem

Creates a new Workshop item and calls onCompleted with the CreateItemResult_t from SteamManager.Update(). Returns the Steam API call handle, or 0 on failure.


Returns: ulong
Parameters:
  • consumerAppId: uint
  • fileType: uint
  • onCompleted: Action<SteamUgcCreateItemResult>
Attribute Args:
  • consumerAppId: Your game AppId.
  • fileType: Numeric EWorkshopFileType value.
  • onCompleted: Called once with the new item ID and result.
CreateItemAsync

Creates a new Workshop item and returns a task with the CreateItemResult_t. Keep calling SteamManager.Update() while waiting.


Returns: Task<SteamUgcCreateItemResult>
Parameters:
  • consumerAppId: uint
  • fileType: uint
  • cancellationToken: CancellationToken
Attribute Args:
  • consumerAppId: Your game AppId.
  • fileType: Numeric EWorkshopFileType value.
  • cancellationToken: Cancels the wait (the Steam call keeps running).
StartItemUpdate

Starts an update transaction for an existing Workshop item.


Returns: ulong
Parameters:
  • consumerAppId: uint
  • publishedFileId: ulong
Attribute Args:
  • consumerAppId: Your game AppId.
  • publishedFileId: Existing workshop item ID.
SetItemTitle

Sets workshop item title for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • title: string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • title: New item title.
SetItemDescription

Sets workshop item description for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • description: string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • description: New item description.
SetItemMetadata

Sets workshop item metadata for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • metadata: string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • metadata: Metadata string (up to Steam's size limits).
SetItemVisibility

Sets workshop item visibility for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • visibility: uint
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • visibility: Numeric ERemoteStoragePublishedFileVisibility value.
SetItemTags

Sets workshop item tags for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • tags: string[]
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • tags: Array of tag strings.
SetItemContent

Sets workshop item content folder path for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • contentFolder: string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • contentFolder: Absolute path to content folder.
SetItemPreview

Sets workshop item preview image path for a pending update.


Returns: bool
Parameters:
  • updateHandle: ulong
  • previewFile: string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • previewFile: Absolute path to preview image file.
SubmitItemUpdate

Submits a pending workshop item update and returns a Steam API call handle.


Returns: ulong
Parameters:
  • updateHandle: ulong
  • changeNote: string
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • changeNote: Changelog note for the update.
SubmitItemUpdate

Submits a pending workshop item update and calls onCompleted with the SubmitItemUpdateResult_t from SteamManager.Update(). Returns the Steam API call handle, or 0 when submission failed.


Returns: ulong
Parameters:
  • updateHandle: ulong
  • changeNote: string
  • onCompleted: Action<SteamUgcSubmitItemUpdateResult>
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • changeNote: Changelog note for the update.
  • onCompleted: Called once with the upload result.
SubmitItemUpdateAsync

Submits a pending workshop item update and returns a task with the SubmitItemUpdateResult_t. Keep calling SteamManager.Update() while waiting.


Returns: Task<SteamUgcSubmitItemUpdateResult>
Parameters:
  • updateHandle: ulong
  • changeNote: string
  • cancellationToken: CancellationToken
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • changeNote: Changelog note for the update.
  • cancellationToken: Cancels the wait (the upload keeps running).
GetItemUpdateProgress

Gets progress state for a pending item update upload.


Returns: uint
Parameters:
  • updateHandle: ulong
  • bytesProcessed: out ulong
  • bytesTotal: out ulong
Attribute Args:
  • updateHandle: Handle from StartItemUpdate.
  • bytesProcessed: Uploaded bytes output.
  • bytesTotal: Total bytes output.
CreateQueryAllUgcRequest

Creates a UGC query request handle for workshop discovery.


Returns: ulong
Parameters:
  • queryType: uint
  • matchingType: uint
  • creatorAppId: uint
  • consumerAppId: uint
  • page: uint
Attribute Args:
  • queryType: Numeric EUGCQuery value from Steamworks docs.
  • matchingType: Numeric EUGCMatchingUGCType value from Steamworks docs.
  • creatorAppId: AppId filter for creator app.
  • consumerAppId: AppId filter for consumer app.
  • page: Query page number, starting at 1.
SendQueryUgcRequest

Submits an existing UGC query request and returns a Steam API call handle.


Returns: ulong
Parameters:
  • queryHandle: ulong
Attribute Args:
  • queryHandle: UGC query handle returned from CreateQueryAllUgcRequest.
SendQueryUgcRequest

Submits a UGC query and calls onCompleted with the SteamUGCQueryCompleted_t from SteamManager.Update(). Returns the Steam API call handle, or 0 on failure.


Returns: ulong
Parameters:
  • queryHandle: ulong
  • onCompleted: Action<SteamUgcQueryCompletedResult>
Attribute Args:
  • queryHandle: UGC query handle returned from CreateQueryAllUgcRequest.
  • onCompleted: Called once with the query result.
SendQueryUgcRequestAsync

Submits a UGC query and returns a task with the SteamUGCQueryCompleted_t. Keep calling SteamManager.Update() while waiting.


Returns: Task<SteamUgcQueryCompletedResult>
Parameters:
  • queryHandle: ulong
  • cancellationToken: CancellationToken
Attribute Args:
  • queryHandle: UGC query handle returned from CreateQueryAllUgcRequest.
  • cancellationToken: Cancels the wait (the query keeps running).
ReleaseQueryUgcRequest

Releases a UGC query handle after you are done with query results.


Returns: bool
Parameters:
  • queryHandle: ulong
Attribute Args:
  • queryHandle: UGC query handle to release.
GetNumSubscribedItems

Gets the number of workshop items the current user is subscribed to.


Returns: uint
GetSubscribedItems

Gets subscribed workshop item IDs for the current user.


Returns: ulong[]
Parameters:
  • maxEntries: uint
Attribute Args:
  • maxEntries: Maximum number of subscribed IDs to retrieve.
SubscribeItem

Subscribes the current user to a workshop item.


Returns: ulong
Parameters:
  • publishedFileId: ulong
Attribute Args:
  • publishedFileId: Published file ID of the workshop item.
UnsubscribeItem

Unsubscribes the current user from a workshop item.


Returns: ulong
Parameters:
  • publishedFileId: ulong
Attribute Args:
  • publishedFileId: Published file ID of the workshop item.

SteamUgcQueryCompletedResult

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUgcQueryCompletedResult

Result of ISteamUGC::SendQueryUGCRequest (SteamUGCQueryCompleted_t). Release the query handle with ReleaseQueryUgcRequest when done.


QueryHandle

The UGC query handle the results belong to.


Result

Numeric EResult value (1 = OK).


NumResultsReturned

Number of items returned in this page.


TotalMatchingResults

Total number of items matching the query.


CachedData

True when the results came from the local cache.


NextCursor

Cursor for the next page (cursor-based queries only).


IoFailure

True when the result could not be retrieved; the other fields are then not valid.


IsSuccess

True when the result was retrieved and EResult is OK.


SteamUgcSubmitItemUpdateResult

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUgcSubmitItemUpdateResult

Result of ISteamUGC::SubmitItemUpdate (SubmitItemUpdateResult_t).


Result

Numeric EResult value (1 = OK).


UserNeedsToAcceptWorkshopLegalAgreement

True when the user must accept the Workshop legal agreement before the item becomes visible.


PublishedFileId

The updated Workshop item ID.


IoFailure

True when the result could not be retrieved; the other fields are then not valid.


IsSuccess

True when the result was retrieved and EResult is OK.


SteamUserStatsManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUserStatsManager

Provides access checks for ISteamUserStats.


RequestUserStats

Requests user stats for a target SteamID64 and returns a Steam API call handle.


Returns: ulong
Parameters:
  • steamIdUser: ulong
Attribute Args:
  • steamIdUser: Target SteamID64.
RequestGlobalStats

Requests global stats history and returns a Steam API call handle.


Returns: ulong
Parameters:
  • historyDays: int
Attribute Args:
  • historyDays: Number of days of history to request.
ResetAllStats

Resets local user stats, optionally including achievements.


Returns: bool
Parameters:
  • achievementsToo: bool
Attribute Args:
  • achievementsToo: True to also clear achievement state.
GetStatInt32

Gets a named integer stat value.


Returns: bool
Parameters:
  • name: string
  • data: out int
Attribute Args:
  • name: Stat API name.
  • data: Output integer stat value.
SetStatInt32

Sets a named integer stat value.


Returns: bool
Parameters:
  • name: string
  • data: int
Attribute Args:
  • name: Stat API name.
  • data: Integer stat value to set.
StoreStats

Stores pending stats and achievement changes to Steam.


Returns: bool

SteamUtilsManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamUtilsManager

Provides access checks for ISteamUtils.


GetAppId

Gets the current Steam AppId reported by SteamUtils.


Returns: uint
GetIpCountry

Gets the two-letter country code inferred by Steam based on the current IP.


Returns: string
IsOverlayEnabled

Checks whether Steam Overlay is currently enabled.


Returns: bool

SteamVideoManager

OmegaLeo.HelperLib.Steamworks
Member Documentation
SteamVideoManager

Provides access checks for ISteamVideo.


GetVideoUrl

Requests a video URL for a given Steam video app id.


Returns: void
Parameters:
  • videoAppId: uint
Attribute Args:
  • videoAppId: Steam video app id.
IsBroadcasting

Checks whether the user is broadcasting and returns current viewer count.


Returns: bool
Parameters:
  • numberOfViewers: out int
Attribute Args:
  • numberOfViewers: Viewer count output when broadcasting.