Analytics Overview
The analytics service lets you log structured player behaviour events from your Unity game. Events are defined as plain C# classes, batched locally, and flushed to Tactile’s analytics pipeline over HTTPS.
How it works
- You define event classes decorated with
[TactileAnalytics.EventAttribute]and property-level description attributes. - During a Unity build, the SDK’s build processor scans your assemblies, finds all event classes, and writes a versioned schema file to
[Output]/TactileAnalytics/in your project root. - You upload the schema file to the PlayOps dashboard to register your schema.
- At runtime, your game calls
sdk.Analytics().LogEvent(new MyEvent(...)). The SDK batches events and flushes them asynchronously. - The pipeline validates incoming events against the registered schema before ingesting them.
Accessing the service
PlayOpsAnalytics analytics = sdk.Analytics();Analytics() throws PlayOpsNotInitializedException if called before sdk.Initialize().
Event lifecycle
Events are logged synchronously from your game thread — LogEvent returns immediately. Events are persisted to disk in batches and sent asynchronously, so events are not lost if the app is force-quit, crashes, or is offline — batches are retried on the next launch or when the app resumes, until the server acknowledges them.