class
Stats
public static abstract sealed class Stats Allows access to stats for the current game. Stats are defined by the game's author and can be used to track anything from player actions to performance metrics. They are how you submit data to leaderboards.
Properties
| Name | Type | Description |
|---|---|---|
Global static | GlobalStats | Get the global stats for the calling package |
LocalPlayer static | PlayerStats | Get the global stats for the calling package |
Methods
static Task FlushAsync(CancellationToken token = null) Send any pending stats to the backend. Don't wait for confirmation of ingestiom, fire and forget.
static Void Flush() Send any pending stats to the backend. Don't wait for confirmation of ingestiom, fire and forget.
static Task FlushAndWaitAsync(CancellationToken token = null) Send any pending stats to the backend, will wait until they're available for query before finishing.
static Void Increment(String name, Double amount) static Void Increment(String name, Double amount, String context, Object data = null) static Void Increment(String name, Double amount, Dictionary<String, Object> data) static Void SetValue(String name, Double amount, String context = null, Object data = null) static Void SetValue(String name, Double amount, Dictionary<String, Object> data) static GlobalStats GetGlobalStats(String packageIdent) Get the global stats for this package
static PlayerStats GetLocalPlayerStats(String packageIdent) Get the global stats for this package
static PlayerStats GetPlayerStats(String packageIdent, Int64 steamid) Get the stats for this package