G-Less / Unity / Integration guide

Unity SDK integration

For Unity PC and Steam games. Application sessions are automatic; the game explicitly marks runs, matchmaking, progression and custom events.

Current version
0.1.0
Protocol
4
Unity
2021.3+
Delivery
Async, offline replay

01–02

Download and install the package

The archive is a standard Unity package. Copy it into Packages or select its package.json from Package Manager.

Download

Download and extract the GlessTelemetry Unity package.

Add to project

Copy to Packages/com.gless.telemetry

Create settings

Use Tools / G-Less / Create or Select Telemetry Settings

03

Connect your project

Prefer the Settings Asset for these fields; the code form is available for runtime configuration.

No project yet? Create one first; G-Less will generate a one-time write key and return you here.

Create or select a project
TelemetryBootstrap.cs
using Gless.Telemetry;

GlessTelemetry.Configure(new GlessTelemetryConfig {
    endpoint = "https://g-less.com/api/v1/telemetry/ingest",
    projectId = "YOUR_PROJECT_UUID",
    writeKey = "gls_pk_YOUR_WRITE_KEY",
    channel = "demo",
    buildId = "YOUR_GAME_BUILD",
    enabledByDefault = true,
    captureSteamAccountId = true
});

Channel

demo · playtest · retail · development

BuildId

Unique for each released build

WriteKey

Append-only; cannot read the dashboard

04

Instrument game semantics

The SDK handles launch, heartbeat and exit. Game code calls the API only at confirmed state boundaries.
GameTelemetry.cs · runs
using Gless.Telemetry;

// One application session can contain multiple runs.
GlessTelemetry.StartRun(
    mode: "standard",
    category: "cooperative",
    playerCount: 1,
    teammateCount: 0);

GlessTelemetry.TrackProgression("tutorial", "complete", 1);
GlessTelemetry.EndRun("completed", finalScore);
GameTelemetry.cs · custom data
using System.Collections.Generic;

// Categories and modes are defined by your game.
GlessTelemetry.TrackMatchmakingAttempt(
    "cooperative", "quick_match", partySize);

// Optional game-specific exact measurement.
GlessTelemetry.SetProgress(exactDepthMeters, "digging");

GlessTelemetry.TrackCustomEvent("weapon_selected",
    new Dictionary<string, object> {
        { "weapon_id", weaponId },
        { "mode", gameMode }
    });

Application session

Automatic launch-to-exit

Run

StartRun → EndRun

Matchmaking

Attempt, result, wait, party

Steam

Optional, fail-safe fallback

05

Verify the first event

Confirm the smallest path before adding gameplay events.
  1. 1Enter Play Mode and search the Console for G-Less.
  2. 2Open Live events and select Editor / Development.
  3. 3Confirm session_start or app_started arrives.
  4. 4Relaunch offline, restore the network and verify replay.
  5. 5Finally test a player build and select the player filter.

Runtime safety

UnityWebRequest sends asynchronously; gameplay never waits for network.

The offline queue is bounded and disk I/O runs on background tasks.

Shutdown never waits for network or file tasks.

Missing or uninitialized Steamworks falls back to an anonymous install ID.

After opt-out, public calls become no-ops and unsent data is deleted asynchronously.