The Unity SDK: Packages, Prefabs, and Ten-Minute Integration
This page is for the Unity developer who just opened a ticket that says 'add analytics to the XR build'. Not a manifesto about what analytics could be — the concrete steps, the version matrix, and the two or three things that always break the first time in a Unity XR project.
Version matrix, first
The SDK targets Unity 2021.3 LTS or newer and expects the XR Plugin Management + XR Interaction Toolkit 2.5+ stack. It is validated against OpenXR 1.10+, Meta XR SDK v65+, and Unity's URP and Built-in render pipelines. HDRP is supported for spatial-heatmap capture but not for the debug overlay. If your project pins an older XRIT or a custom render pipeline fork, check the compatibility notes before opening a support ticket — most first-day integration issues live in this matrix.
Install in three steps
Add the package via UPM using the Git URL from your workspace. Create a GossipAnalyticsSettings asset (Assets → Create → Gossip Analytics → Settings) and paste your project key. Drop the GossipManager prefab into your first XR scene — it survives scene loads via DontDestroyOnLoad and self-registers with the XR Origin. A working capture pipeline should be live before your next Play-mode run. If it is not, the console log line the SDK emits on start tells you which of the three steps was skipped.
The three Unity-specific gotchas
First: if you disable the Domain Reload optimization, register the GossipManager before your XR Origin awakes or the first session_start fires without a device context. Second: the SDK reads locomotion mode from XRIT's Locomotion Provider — a custom locomotion script needs to raise the provided event or scenes will show up as 'unknown locomotion'. Third: for builds targeting Meta Quest via Meta XR SDK, enable the OpenXR backend in Player Settings — the Oculus XR backend is supported but skips the OpenXR-derived comfort markers.
What the sample scene shows you
The sample package ships one scene per capture mode: a fixed-environment scene wired to a spatial heatmap, an interaction scene showing the derived hesitation marker in the Inspector, and a comfort scene with an intentional locomotion spike so you can see the marker fire in the editor. Use them as a copy/paste reference; do not ship them.
What you get
- Unity 2021.3 LTS+, XRIT 2.5+, OpenXR 1.10+ validated matrix
- UPM Git URL install, single settings asset, single prefab
- URP and Built-in supported; HDRP supported except debug overlay
- GossipManager is DontDestroyOnLoad — one prefab per project
- Sample scenes for heatmap, interaction and comfort capture modes
This is the Unity install page. The engine-agnostic story lives at /xr-sdk-hub; the platform overview at /xr-analytics-platform. If your task today is 'get the SDK compiling in our Unity project by Friday', read this one.