API ReferenceSandbox.Services
BenchmarkSystemclass
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.
object→BenchmarkSystem
Constructors1
Showing 1 constructors
public BenchmarkSystem()
No results match this filter.
Methods5
Showing 5 methods
public void Finish()
Called to close a benchmark off
Returns:
void—public void Sample()
Should be called in update every frame
Returns:
void—public System.Threading.Tasks.Task`1<System.Guid> SendAsync(System.Threading.CancellationToken token = null)
Finish this benchmark session and send it off to the backend
| Parameter | Type | Description |
|---|---|---|
| token = null | CancellationToken | — |
Returns:
Task<Guid>—public void SetMetric(string name, double metric)
Set a custom metric, like load time, shutdown time etc
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| metric | double | — |
Returns:
void—public void Start(string name)
Called to start a benchmark
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
Returns:
void—No results match this filter.