class Stats

in global :: Sandbox . Services

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.


public static Task FlushAsync( CancellationToken token = null )

Send any pending stats to the backend. Don't wait for confirmation of ingestiom, fire and forget.

public static Task FlushAndWaitAsync( CancellationToken token = null )

Send any pending stats to the backend, will wait until they're available for query before finishing.

public static Stats.GlobalStats Global { get; }

Get the global stats for the calling package

public static Stats.GlobalStats GetGlobalStats( string packageIdent )

Get the global stats for this package

public static Stats.PlayerStats LocalPlayer { get; }

Get the global stats for the calling package

public static Stats.PlayerStats GetLocalPlayerStats( string packageIdent )

Get the global stats for this package

public static Stats.PlayerStats GetPlayerStats( string packageIdent, long steamid )

Get the stats for this package

public static void Flush( )

😔 No documentation found.

public static void Increment( string name, double amount, string context = null, object data = null )

😔 No documentation found.

public static void Increment( string name, double amount, Dictionary<string,object> data )

😔 No documentation found.

public static void SetValue( string name, double amount, string context = null, object data = null )

😔 No documentation found.

public static void SetValue( string name, double amount, Dictionary<string,object> data )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.