This guide explains how to install and use the official Indigauge Unity SDK in a Unity project.
The Unity SDK gives you session tracking, structured event logging, session metadata, heartbeats, crash reporting, screenshot capture, and an in-game feedback panel built on top of UI Toolkit.
For a complete playable reference, open the example project in the C# SDK repository.
Use the public key for the game you want to track. The key is safe to ship in a client build because it only identifies the game for ingest.
Alternatively, add this entry inside the existing dependencies object in
your project's Packages/manifest.json:
Keep your other dependency entries. The package includes the compiled .NET
Standard 2.1 Core library, its runtime dependencies, Unity scripts, and all
feedback panel resources. You do not need NuGet, a .NET SDK, manual DLL
copying, or a manually created UIDocument.
The SDK repository is currently private. Installation requires GitHub access and Git authentication configured on your machine. A public repository can be installed without authentication. See Unity's Git authentication guidance.
If your game scripts use an assembly definition, add a reference to
Indigauge.Unity.
Then add an empty GameObject to your first scene and attach the
Indigauge Behaviour (IndigaugeBehaviour) component.
Keep the IndigaugeBehaviour object in your startup scene. The component marks
itself with DontDestroyOnLoad, so one instance can own telemetry across scene
changes.
Before installing the package, remove the old Assets/Indigauge/Runtime
scripts and resources and the SDK DLLs you previously copied into your
project. Do not keep an old Indigauge.Unity.dll or duplicate Core/dependency
DLLs alongside the package. Check whether another plugin shares a dependency
before removing it.
For production, replace #main in the Git URL with a published release tag or
commit hash. To upgrade a pinned installation, update that revision through
Package Manager or the project manifest.
Unity locks Git dependencies. Simply reopening the project does not fetch new
commits from main.
WebGL is not currently supported by the SDK's background worker/networking architecture.
When using managed code stripping or IL2CPP, preserve members of your own event-property and feedback-context types that are serialized through reflection. The package's linker configuration preserves Core's models, not arbitrary game types.
Select the GameObject with IndigaugeBehaviour and fill the Inspector fields:
| Field | Description |
|---|---|
Endpoint Base Url | Ingest API URL. Use the default for production |
Api Key | Indigauge project public key |
Game Id | Game name sent with session startup |
Build Id | Game or build version sent with session startup |
Mode | Runtime telemetry mode |
Enable Panic Hook | Sends unhandled exceptions as crash events by default |
Enable Disk Queue | Persists queued work locally when configured |
Disk Queue Path | Required when disk queueing is enabled |
IndigaugeBehaviour creates the client and starts a session automatically in
Start(). Live session startup is asynchronous.
You can also configure it from code before Start() runs:
Pass IndigaugeMode.Auto explicitly when configuring from code: unlike the
Inspector default, Configure() defaults to Live when its mode argument
is omitted. Call it before IndigaugeBehaviour.Start(); it does not
reconfigure an already-created client.
Auto is the recommended default. It resolves to Dev in the Unity editor and
Live in player builds.
| Mode | Behavior | Use it for |
|---|---|---|
Auto | Uses Dev in the editor and Live outside the editor | Normal projects |
Dev | Starts a local session and logs activity without network sends | Local testing |
Live | Sends sessions, events, heartbeats, metadata, feedback, and crashes | Production and live QA |
Disabled | Skips telemetry work | Opt-out, privacy toggles, internal builds |
If dashboard data does not appear while testing in the editor, check the mode
first. Auto intentionally uses local Devmode inside the Unity editor.
Events are queued after a session starts and flushed automatically. In Dev
mode, events are logged locally instead of sent to the API.
Call the static helpers only after IndigaugeBehaviour.Start() has created
the client. The component has a late execution order, so another component's
Awake() or default-order Start() is too early for event or metadata calls;
calls made before client creation are ignored.
Use the static helpers when you want global access:
If you prefer to keep telemetry in one gameplay component, wrap those static helpers in methods that match your own game events:
Event names must follow the same format as the other SDKs:
namespace.event.Good event names:
Invalid event names:
See the Event Naming guide for more detail.
Session metadata describes the whole play session. Use it for state that you want to inspect alongside sessions and events, such as score, level, difficulty, region, build channel, character class, matchmaking mode, or experiment assignment.
When a session is active, metadata changes are sent with the next flush or as
soon as the client can send them. In Dev mode, the update is logged locally.
The Unity adapter includes a feedback panel. You can open it from your own UI, input handling, or QA shortcut:
The built-in panel supports a message field, category selection, optional
screenshot upload, custom labels, custom colors, and a context provider.
Its assets are included in the package; do not copy them into Assets.
The panel requires a message and preserves the draft if submission fails. Players can close it with Cancel, X, or Escape. When attaching a screenshot, the built-in flow hides the panel and waits for a rendered game frame before capturing it.
Set a context provider when you want feedback to include current game state:
Customize the built-in panel before opening it:
The UI Toolkit panel is centered. PanelRect.width sets its preferred width;
a positive height sets its preferred height, and zero fits the content. The
x/y coordinates are unused. The panel is constrained to the viewport and
scrolls vertically on smaller screens.
Set panel options and the context provider after the component's Awake()
has registered its instance. A context passed to ShowFeedbackPanel() or
ToggleFeedbackPanel() takes precedence over the provider.
To submit feedback directly:
SubmitFeedbackAsync() queues feedback for the background sender; completion
does not confirm server delivery. CapturePng() uses Unity APIs and must run
on the main thread. For custom screenshot flows, capture after the frame has
rendered and hide any UI you do not want included; the built-in panel handles
this sequencing for you.
Accepted feedback categories are:
Unknown or empty categories are sent as other.
Enable Panic Hook is on by default. When an unhandled exception reaches the
SDK hook, Indigauge queues a game.crash event with exception type, message,
stack trace, thread id, timestamp, and fatal flag.
You can disable or enable the hook at runtime:
The hook listens for global unhandled exceptions and unobserved task exceptions; do not assume every error logged to the Unity Console reaches it. Hard process crashes cannot guarantee delivery. On application quit, the adapter requests session end and attempts a background flush and disposal, but process termination can interrupt that work. Keep crash metadata free of secrets or personally identifying information.
IndigaugeBehaviour creates an IndigaugeClient with these defaults:
| Option | Default | Description |
|---|---|---|
EndpointBaseUrl | https://ingest.indigauge.com | Ingest API URL |
SdkVersion | unity:1.0.0 | SDK identifier sent with requests |
Mode | Auto | Resolves to Dev in editor, Live in builds |
EnablePanicHook | true | Registers global unhandled-exception handling |
EnableDiskQueue | false | Enables local persistence for queued work |
MaxBatchSize | 64 | Maximum events sent per batch |
MaxBatchDelay | 10s | Maximum delay before flushing a partial batch |
MaxAttempts | 5 | Retry attempts for send failures |
BaseBackoff | 500ms | Initial retry backoff |
SessionHeartbeatInterval | 30s | Heartbeat interval for active live sessions |
Batching, retry, and heartbeat settings are Core defaults, not additional
Inspector fields or arguments to Configure().
IndigaugeBehaviour starts automatically in Start().
The repository includes a playable Unity Breakout sample. Unlike Package Manager installation, this source-based sample uses an export script and requires a .NET SDK and PowerShell.
Clone the C# SDK repository and, from its root, build and copy the SDK assemblies and runtime resources:
Open sdk-csharp/samples/UnitySample in Unity Hub.
Open Assets/Scenes/Breakout.unity.
Select the IndigaugeBreakout GameObject.
Fill Endpoint Base Url, Api Key, Game Name, Game Version, and
Mode.
Enter Play Mode.
Press F or use the HUD feedback button to test the feedback panel.
Use Live explicitly to see sample data in the dashboard while in the editor.
Do not add the UPM package on top of the sample's copied runtime files and
DLLs.
The sample records session metadata and these events:
Api Key.Game Id and Build Id.Mode as Auto unless you need to force a specific mode.Live mode before shipping.?path=/src/Indigauge.Unity before the
revision fragment.Indigauge.Unity.Live mode. Auto is local Dev mode in
the Unity editor.Api Key, Game Id, and Build Id are set before
IndigaugeBehaviour.Start() runs.Awake() or default-order
Start() before the SDK client exists.namespace.event format.Dev mode, events are logged locally instead of sent to the API.IndigaugeBehaviour object exists, including one
preserved from your startup scene.Runtime/Resources assets
are present. You do not need an Assets/Indigauge/Runtime/Resources copy.IndigaugePanelSettings errors.IndigaugeBehaviour.ShowFeedbackPanel() directly to verify the panel
loads.IndigaugePanelSettings.asset and theme with
its runtime resources.32767 for its feedback UI; custom UI can still obscure it depending
on its own rendering setup.