s&box docs
API ReferenceSandbox.Services

public class Sandbox.Services.BenchmarkSystem

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.

Constructors

Showing 1 constructors

Methods

Showing 5 methods

public void Finish()

Called to close a benchmark off

public void Sample()

Should be called in update every frame

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

Parameters

  • token: Default: null

public void SetMetric(string name, double metric)

Set a custom metric, like load time, shutdown time etc

public void Start(string name)

Called to start a benchmark

Metadata

FieldValue
NamespaceSandbox.Services
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Services.BenchmarkSystem

On this page