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.

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 polling, and shutdown for applications using the Steam API.


Example:
SteamManager.ConfigureLogger(logger);
SteamManager.ConfigureAppId(480);
var steam = SteamManager.Instance;
steam.Update();
Instance

Singleton access to the Steam manager.


IsSteamworksInitialized

Indicates whether Steamworks is initialized and ready for API calls.


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.
ConfigureAppId

Configures the Steam AppId used during initialization. Must be called before accessing the singleton instance.


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

Executes Steamworks callbacks. Call every frame from your game loop.


Returns: void
Shutdown

Shuts down Steamworks and clears the initialized state.


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.

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

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.

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.
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.
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.
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.
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.

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.