App Data
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
A data wrapper around the Steam's concept of "app". This provides quick and efficient access to features and functions related to a Steam App and lets you use AppData interchangeably with any of the related types DlcData, AppId_t, CGameID, uint, ulong
App Data is used by Steam to uniquely identify an "app" ... for Steam an "app" is a game, tool, server, dlc, demo or really anything similarly defined as part of the Steam Developer Portal. It can often be useful to convert the various forms in which Steam identifies an "app" such that you can get its name or open its store page.
For example Steam identifies which game a user is the User's Game Info via CGameID which can be converted to an AppId_t which can be used to get the uint and passed to the Web ID to get the name of the game the friend is playing.
Heathen makes this much simpler AppData.Get(gameId).Name
as you can see our approach has far fewer steps thanks to AppData which provides the translation layer for the various ways Steam represents an App's ID.
Fields and Attributes
Me
This gets the AppData for the currently initialized app if any. I.e. this is your App ID as in the one running right now as far as Steam API is aware. Its often useful to test this and make sure its the value you expect and that your user isn't trying to spoof as some other app.
appId
The Steamworks native data type representation of this app
IsMe
Returns true if this AppData represents the app that is running this code e.g. the same as
Id
The primitive data type that represents an app
Name
Gets the local display name Steam store uses for this app for this user ... this expects that you have already loaded the names via the LoadNames method here on the AppData object or in the API.App.Client class.
Names Loaded
Returns true if app names have already been loaded
Methods
Get
The Get method can be used to "get" an AppData matching whatever input it is you have
Get Name
Returns true if the name is loaded and found and if so then name will be populated with the name, this is the same as reading the Name field.
This is an async version that will check if the name is loaded, if not it will load it, when completed it will invoke the callback which takes the form of
Open Steam Store
This is an instanced version of the method meaning you call it on a given AppData such as AppData.Me.OpenSteamStore();
Note that the input parameter named flag is optional and can be ignored, to see the available options please review Valve's documentation on the subject.
A static option for calling the same method that can handle any convertable value for AppData for exmple
Assuming 123456789 was a valid App ID that would open the steam overlay to the store page for that app
Open My Steam Store
A static method to open the store for the current App
Last updated