G-Less / Unity / API

Unity SDK API reference

Standalone web API reference for the G-Less game telemetry SDK. The Agent Skill is a separate integration asset and does not replace this page.

SDK version

0.1.0

HTTP API

v1

Event protocol

4

CFG

Configuration fields

GlessTelemetryConfig
FieldType / exampleMeaning
endpointhttps://g-less.com/api/v1/telemetry/ingestUse the versioned HTTPS endpoint.
projectIdUUIDProject ID from the workspace.
writeKeygls_pk_…Append-only key; never commit it.
channeldemo | playtest | retail | developmentStable release environment.
buildIdstringUnique for every materially different binary.
enabledByDefaultboolDefault privacy choice; still expose an in-game toggle.
captureSteamAccountIdboolSends only a project-scoped pseudonym, never the raw Steam ID.

API

Configuration and state

5 methods

Configure

#
void Configure(GlessTelemetryConfig config)

Creates the runtime and starts collection when required fields are valid.

SetEnabled

#
void SetEnabled(bool enabled)

Applies player opt-in or opt-out immediately.

IsConfigured

#
bool IsConfigured { get; }

Whether endpoint, project and write-key configuration is usable.

IsEnabled

#
bool IsEnabled { get; }

Whether the configured runtime currently accepts events.

SessionId

#
string SessionId { get; }

Anonymous ID for the active application session.

API

Runs and progression

5 methods

StartRun

#
string StartRun(string mode = "default", string category = "", int playerCount = -1, int teammateCount = -1, bool matchmakingAttempted = false, bool matchmakingSucceeded = false)

Starts one gameplay attempt and returns its run ID.

EndRun

#
void EndRun(string outcome, double score = 0)

Ends the active run with a stable outcome and optional score.

SetProgress

#
void SetProgress(double depthMeters, string stage = "")

Updates exact depth/progress and an optional stable stage.

UpdateRunPopulation

#
void UpdateRunPopulation(int playerCount, int teammateCount)

Records a changed run population without emitting unchanged values.

TrackProgression

#
void TrackProgression(string progression, string status, double value = 0)

Records a named progression lifecycle step.

API

Matchmaking and interaction

3 methods

TrackMatchmakingAttempt

#
void TrackMatchmakingAttempt(string category, string mode, int partySize)

Records an accepted queue attempt.

TrackMatchmakingResult

#
void TrackMatchmakingResult(string category, string mode, bool succeeded, string result, int partySize, int teammateCount, double durationSeconds)

Records the terminal matchmaking result and wait time.

TrackInteraction

#
void TrackInteraction(string action, string surface, string target, string category = "", string mode = "")

Records a low-cardinality accepted UI action.

API

Game systems

3 methods

TrackResourceTransaction

#
void TrackResourceTransaction(string direction, string currency, double amount, string reason, string itemCategory = "", string itemId = "", double balanceAfter = -1)

Records a currency or item source/sink.

TrackUpgrade

#
void TrackUpgrade(string upgradeId, string category, int levelBefore, int levelAfter, string result, string costCurrency = "", double costAmount = 0)

Records accepted, failed or rejected upgrades.

TrackQuest

#
void TrackQuest(string questId, string category, string status, double progressValue = 0)

Records quest lifecycle state.

API

Custom, diagnostics and delivery

4 methods

TrackCustomEvent

#
void TrackCustomEvent(string name, IDictionary<string, object> properties = null)

Records a low-cardinality custom event with small scalar properties.

TrackPerformanceSnapshot

#
void TrackPerformanceSnapshot(double averageFps, double p95FrameTimeMs)

Records a sampled performance snapshot; call at low frequency.

ReportError

#
void ReportError(string errorCode, string context = "")

Records an already-handled anonymous error; it is not a crash reporter.

Flush

#
void Flush()

Schedules an asynchronous upload; it does not block until completion.