s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
results
Game Jam III
Crowned
Sat 3 Oct
Winner
🏆 GAMMA ☢ TEAM
Theme
One More Round
This jam is over. The next one will show up here.
See the results
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Live Services
Stats
chevron_left
Live Services
class
Stats
Static Properties
data_object
Global
data_object
LocalPlayer
Static Methods
functions
Flush
functions
FlushAndWaitAsync
functions
FlushAsync
functions
GetGlobalStats
functions
GetLocalPlayerStats
functions
GetPlayerStats
functions
Increment
functions
SetValue
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.
class
Sandbox.Services
.
static
sealed
abstract
Sandbox.Engine
data_object
Static Properties
2
Global
GlobalStats
Get the global stats for the calling package
LocalPlayer
PlayerStats
Get the global stats for the calling package
functions
Static Methods
8
Flush
(
)
Send any pending stats to the backend. Don't wait for confirmation of ingestiom, fire and forget.
FlushAndWaitAsync
(
token
)
Task
Send any pending stats to the backend, will wait until they're available for query before finishing.
FlushAsync
(
token
)
Task
Send any pending stats to the backend. Don't wait for confirmation of ingestiom, fire and forget.
GetGlobalStats
(
packageIdent
)
GlobalStats
Get the global stats for this package
GetLocalPlayerStats
(
packageIdent
)
PlayerStats
Get the global stats for this package
GetPlayerStats
(
packageIdent
,
steamid
)
PlayerStats
Get the stats for this package
Increment
(
name
,
amount
)
SetValue
(
name
,
amount
,
context
,
data
)
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.