Steamworks.SteamUserStats
Events
result of a request to store the achievements for a game, or an
"indicate progress" call. If both m_nCurProgress and m_nMaxProgress
are zero, that means the achievement has been fully unlocked
called when the latests stats and achievements have been received
from the server
result of a request to store the user stats for a game
Callback indicating that a user's stats have been unloaded
Properties
Get the available achievements
Methods
Adds this amount to the named stat. Internally this calls Get() and adds
to that value. Steam doesn't provide a mechanism for atomically increasing
stats like this, this functionality is added here as a convenience.
static async Task<Data.Leaderboard> FindOrCreateLeaderboardAsync( string name, Data.LeaderboardSort sort, Data.LeaderboardDisplay display )
Gets a leaderboard by name, it will create it if it's not yet created.
Leaderboards created with this function will not automatically show up in the Steam Community.
You must manually set the Community Name field in the App Admin panel of the Steamworks website.
As such it's generally recommended to prefer creating the leaderboards in the App Admin panel on
the Steamworks website and using FindLeaderboard unless you're expected to have a large amount of
dynamically created leaderboards.
Get a float stat value
Get a Int stat value
Show the user a pop-up notification with the current progress toward an achievement.
Will return false if RequestCurrentStats has not completed and successfully returned
its callback, if the achievement doesn't exist/has unpublished changes in the app's
Steamworks Admin page, or if the achievement is unlocked.
Tries to get the number of players currently playing this game.
Or -1 if failed.
Asynchronously request the user's current stats and achievements from the server.
You must always call this first to get the initial status of stats and achievements.
Only after the resulting callback comes back can you start calling the rest of the stats
and achievement functions for the current user.
Asynchronously fetches global stats data, which is available for stats marked as
"aggregated" in the App Admin panel of the Steamworks website.
You must have called RequestCurrentStats and it needs to return successfully via
its callback prior to calling this.
Practically wipes the slate clean for this user. If includeAchievements is true, will wipe
any achievements too.
Set a stat value. This will automatically call StoreStats() after a successful call
unless you pass false as the last argument.
Send the changed stats and achievements data to the server for permanent storage.
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is successful.
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You should only be calling this during major state changes such as the end of a round, the map changing, or the user leaving a server. This call is required to display the achievement unlock notification dialog though..