Unity plugin for rendering on eye-tracked 3D light field displays via the DisplayXR OpenXR runtime. Works with any OpenXR-compatible 3D display.
- Overview
- Requirements
- Installing the Plugin
- Enabling the Feature
- Scene Setup
- Stereo Tunables Reference
- 2D UI Overlay
- Preview (Play Mode)
- Building Your App
- Deploying to End Users
- What Happens When Things Are Missing
- Testing Without Hardware
- Troubleshooting
- Architecture
New to the plugin? Start with the Quick Start Guide — a step-by-step walkthrough that covers installation, demo scenes for both stereo modes, building standalone apps, and end-to-end testing on Windows and macOS.
Want a ready-to-open Unity project? Clone displayxr-unity-samples and open
samples/birp-multipass/— a minimal Unity 6 project that depends on this plugin via UPM. Open it in Unity, hit Play, and you're rendering on a spatial display. (The repo also holds URP, HDRP, and Desktop Avatar samples.)
DisplayXR ships as a custom Unity display provider (IUnityXRDisplay, the same integration route as Oculus/Varjo/Cardboard) that drives the DisplayXR OpenXR runtime directly while Unity keeps rendering the scene. It provides:
- Eye-tracked stereo rendering — runtime-owned Kooima asymmetric frustum projection from real-time eye positions (
XR_DXR_view_rig) - Two stereo rig modes — Camera-centric (add to existing camera) or display-centric (place a virtual display in the scene)
- 2D/3D display zones + 2D UI overlay — frame 3D content to window-pixel zones and route any Canvas to a window-space composition layer with stereo disparity
- BiRP, URP, and HDRP — off-axis projection on all three pipelines (the provider hands Unity a full per-eye projection matrix, so no per-pipeline fix is needed). URP and HDRP render Single-Pass-Instanced, the Built-in pipeline Multi-Pass; see Render Path
- Hand tracking (XR Hands) — the runtime's
XR_EXT_hand_tracking(Ultraleap input provider) as a standardcom.unity.xr.handssubsystem, compiled in only when that package is installed; seedocs~/architecture/hand-tracking.md - Agent APIs that do nothing until the app calls them —
DisplayXRMcp(the app's own tools for AI agents,XR_DXR_mcp_tools) andDisplayXRDesktop(the app's agent reads and operates other windows,XR_DXR_desktop_control). The plugin registers no tool and asks for no desktop consent on its own: no app tool exists until the app callsDisplayXRMcp.RegisterTool, and no desktop operation is allowed until the app callsDisplayXRDesktop.Requestand the user grants it. (Separately, the runtime hosts its own MCP server in each app process when MCP is enabled on the machine; it answers questions about the display and the window. That is a machine setting, not something the plugin switches.) - In-editor Play Mode preview — pressing Play runs the provider itself, giving full parity with built apps (#171). Play Mode is the preview — there is no separate edit-mode preview window.
How it works: the provider registers a DisplayXR Display display subsystem, binds an OpenXR session to Unity's graphics device, chains the runtime's XR_DXR_view_rig descriptor onto xrLocateViews, and submits Unity's rendered eye textures back to the runtime compositor via xrEndFrame. Enable it under XR Plug-in Management > Standalone > DisplayXR Display (see Enabling the Feature). See docs~/architecture/xr-display-provider.md for the full provider design.
| Requirement | Details |
|---|---|
| Unity | 2022.3 LTS or later (including Unity 6) |
| XR Plugin Management | com.unity.xr.management 4.4.0+. A package dependency: Package Manager installs it with this package. |
| Input System, uGUI | com.unity.inputsystem 1.4.4+ and com.unity.ugui 1.0.0+. Also package dependencies, installed automatically. |
| Unity's OpenXR Plugin | Not needed. The package does not depend on com.unity.xr.openxr; the provider loads the DisplayXR runtime itself. If the project has it for another reason, leave OpenXR unchecked next to DisplayXR Display (see Enabling the Feature). |
| DisplayXR Runtime | DisplayXRSetup-*.exe — required on every target machine. Minimum versions: Runtime Compatibility. See Deploying to End Users. |
| Vendor display plug-in (Leia hardware only) | DisplayXRLeiaSRSetup-*.exe — required for Leia SR hardware. Not needed for sim_display testing or non-Leia displays. Install after the runtime. |
| Editor Platform | Build Target | Native Plugin | Status |
|---|---|---|---|
| Windows | Windows x64 | displayxr_unity.dll |
Supported |
| macOS | macOS | displayxr_unity.bundle (Universal) |
Supported in built players. Editor Play Mode is off on macOS (see Preview (Play Mode)) |
| macOS | Windows x64 | displayxr_unity.dll |
Supported (cross-compile) |
| Linux | Linux x86_64 (Vulkan) | libdisplayxr_unity.so (+ libdisplayxr_unity_wayland.so) |
Supported: X11/XWayland and native Wayland |
| Windows / macOS / Linux | Android arm64 (Vulkan) | libdisplayxr_unity.so (+ libopenxr_loader.so, libVkLayer_DXR_queue_lock.so) |
Supported: tested on a Nubia Pad 2 (Android 13) |
The provider picks Single-Pass-Instanced (SPI) or Multi-Pass from the render pipeline, before the session starts. The graphics API does not change the choice:
| Pipeline | Windows D3D11 | Windows D3D12 | macOS Metal | Linux Vulkan | Android Vulkan |
|---|---|---|---|---|---|
| URP | SPI | SPI | SPI | SPI | SPI |
| HDRP | SPI | SPI | SPI | SPI | SPI |
| Built-in (BiRP) | Multi-Pass | Multi-Pass | Multi-Pass | Multi-Pass | Multi-Pass |
- Windows + Vulkan: a player whose project is set to Vulkan runs on D3D12, with stereo. This is a deliberate fallback (Unity's XR pre-init adapter query cannot be answered on Windows; see
docs~/unity-bug-report-vk-xr-preinit.md). The column that applies is then the D3D12 one. - Any other platform / API pair (for example OpenGL) is not supported: the provider does not start.
- Editor Play Mode on Vulkan is not supported on any OS (the provider declines and logs why). On Windows, switch the editor to D3D12 or D3D11; on Linux, build a player.
DISPLAYXR_FORCE_SPI=1/DISPLAYXR_FORCE_MULTIPASS=1override the table (development only).
The plugin logs its choice at start-up: [DisplayXR] Provider render mode: Single-Pass-Instanced (pipeline=…, gfx=…) or MultiPass.
The plugin and the runtime are released separately. The provider checks which extensions the runtime advertises and leaves a feature off when its extension is missing or too old. The numbers below are the ones this repository states (changelog, docs, source comments); where it states none, check the runtime release notes.
| Plugin feature | Needs from the runtime | Runtime version |
|---|---|---|
| Stereo rendering | XR_DXR_view_rig. Without it the provider log says XR_DXR_view_rig: not found (no stereo) and raw views pass through. |
The release that introduced XR_DXR_view_rig is not stated in this repository; see runtime release notes |
| Desktop baseline: 2D↔3D switching without errors | The runtime's mode-switch grace at xrEndFrame |
v2.17.1 or newer. This is the newest general minimum the changelog states (plugin 2.19.4): against an older runtime a 2D→3D switch can fail with XR_ERROR_VALIDATION_FAILURE. It is not the version that added XR_DXR_view_rig |
| Android player | Runtime APK, XR_DXR_android_surface_binding |
v2.47.0 or newer; tested on v2.53.0 |
| Android: touch copy to the runtime | XR_DXR_android_surface_binding spec 3 |
v2.47.1 or newer |
Linux native Wayland (the <name>.sh launcher) |
GNOME Wayland session + the DisplayXR GNOME Shell extension | v2.28.0 or newer; otherwise the launcher uses X11 |
GPU selection on hybrid laptops (DisplayXRGpuPreference) |
The runtime's DXR_D3D_FORCE_GPU switch |
v2.2.4 or newer |
| Correct colour for Gamma projects, window-space UI and Local2D | Nothing new; the plugin adapts to the runtime's version | The runtime reads swapchain formats literally from v2.21.0 (D3D11), v2.21.1 (D3D12), v2.21.7 (Vulkan); Local2D from v2.26.0 |
Depth-aware cursor, sources Depth / Physics / Auto |
XR_DXR_cursor_depth spec 5 |
v2.36.0 or newer |
Depth-aware cursor, source Measured (and the Auto fallback to it) |
XR_DXR_cursor_depth spec 7 |
v2.39.0 or newer |
Hand joints placed by the runtime in the rig's frame, display-centric rig (DisplayXRDisplay) |
XR_EXT_hand_tracking + XR_DXR_view_rig spec 4 |
v2.47.1 or newer |
The same, camera-centric rig (DisplayXRCamera) |
XR_EXT_hand_tracking + XR_DXR_view_rig spec 5 |
Newer than v2.59.x. A spec-4 runtime (v2.47.1 – v2.59.x) places the hand wrongly under a camera-centric rig; update the runtime. See docs~/architecture/hand-tracking.md |
DisplayXRProvider.MoveWindowToDisplay, TryGetDisplayDesktopOrigin |
XR_DXR_display_info spec 16. MoveWindowToDisplay works on Windows and Linux only; it returns false on macOS |
see runtime release notes |
Rear depth budget for transparent overlays (DisplayXRDepthBudget) |
XR_DXR_depth_budget; spec 2 for DisplayXRContentBounds, spec 3 for the silhouette mask |
see runtime release notes |
3D display zones, DisplayXRLocal2D |
XR_DXR_display_zones |
see runtime release notes |
Window-space UI (DisplayXRWindowSpaceUI) |
The window-space composition layer (XrCompositionLayerWindowSpaceDXR) |
see runtime release notes |
App MCP tools (DisplayXRMcp) |
XR_DXR_mcp_tools, and MCP enabled on the machine |
v1.13 or newer |
Desktop control (DisplayXRDesktop) |
XR_DXR_desktop_control; spec 2 for screen capture, spec 3 for held keys, modifiers and clipboard text |
see runtime release notes |
Controllers and styluses (DisplayXRInput) |
An input provider in the runtime; a stylus needs XR_LOGITECH_mx_ink_stylus_interaction |
see runtime release notes |
Clone and build the native plugin, then add the package from disk:
git clone https://github.com/DisplayXR/displayxr-unity.git cd displayxr-unity/native~ mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release # on Windows, add: -A x64 cmake --build . --config Release
In Unity: Window > Package Manager > + > Add package from disk... → select displayxr-unity/package.json.
Git must be in PATH. Unity's Package Manager requires Git installed and accessible to GUI apps.
- Windows: Install Git for Windows and ensure it's in your system PATH.
- macOS: If Git is installed via Homebrew, Unity launched from Hub/Finder may not find it (GUI apps don't inherit your shell PATH). Fix: run
xcode-select --installto ensure/usr/bin/gitworks, or launch Unity from a terminal. See Troubleshooting for details.
-
In Unity: Window > Package Manager
-
Click + > Add package from git URL...
-
Enter one of:
Pinned to a specific version (recommended for production):
https://github.com/DisplayXR/displayxr-unity.git#upm/vX.Y.ZReplace
vX.Y.Zwith a version from the releases page.Always latest release:
https://github.com/DisplayXR/displayxr-unity.git#upm
Both URLs install from the upm branch, which includes pre-built native binaries (Windows x64, macOS Universal, Linux x86_64, Android arm64) — no local build required. See the releases page for available versions.
Pin
#upm/vX.Y.Z, not#vX.Y.Z. The plainvX.Y.Ztags are the source tags: the Linux and Android.sofiles are built by CI and are not committed there, so a#vX.Y.Zinstall has only their.metafiles (Runtime/Plugins/Linux/x86_64/,Runtime/Plugins/Android/arm64-v8a/) and a Linux or Android build has no plugin binary. Only theupm/…refs carry every platform's binaries.
To update to a newer version later: change the URL fragment to the new #upm/vX.Y.Z in Packages/manifest.json and use Package Manager → Refresh, or re-add the package with the new URL.
- Download the
.tgzfile from the latest release - In Unity: Window > Package Manager
- Click + > Add package from tarball...
- Select the downloaded
.tgzfile
After installation, the package appears as DisplayXR in the Package Manager.
DisplayXR is enabled as a display provider (the shipping path):
- Go to Edit > Project Settings > XR Plug-in Management
- Under the Standalone tab (Windows or macOS), check DisplayXR Display
- Make sure OpenXR is not also checked on the same tab (the provider drives the runtime itself; running both loaders conflicts)
- Check Initialize XR on Startup so the provider comes up in Play Mode and in built apps
You can verify the runtime status in the DisplayXR rig inspectors and the DisplayXR settings panel (display resolution, eye-tracking state).
This is the simplest setup. Your existing Main Camera stays in place and becomes the nominal viewing position. The plugin creates stereo eye offsets around it.
Step 1: Select your Main Camera in the hierarchy.
Step 2: Add Component > DisplayXRCamera (found under DisplayXR category).
That's it. The component:
- Sends its tunables and the camera pose to the runtime each frame
- The runtime computes the Kooima asymmetric frustums from the tracked eye positions
- The provider hands Unity the resulting per-eye pose and projection matrix
Hierarchy:
Main Camera <-- has Camera + DisplayXRCamera
├── Scene objects...
└── (everything else in your scene)
Inspector tunables:
| Parameter | Default | Description |
|---|---|---|
| IPD Factor | 1.0 | Scales inter-eye distance. <1 = reduced stereo, >1 = exaggerated |
| Parallax Factor | 1.0 | Scales eye X/Y offset from viewing axis |
| Inv. Convergence Distance | 0 | 1/meters. 0 = infinity (parallel projection). Higher values = screen plane closer to camera. The inspector shows the equivalent distance in meters. |
Note: The component inherits the camera's vertical FOV automatically. Change it on the Camera component, not on DisplayXRCamera.
When to use camera-centric mode:
- First-person games and apps
- Retrofitting stereo into an existing project (just add the component)
- When the camera moves freely through the scene
The display is a fixed object in the scene. Eye positions are transformed relative to this virtual display.
Step 1: Create an empty GameObject where the virtual display should be:
- GameObject > Create Empty, name it "VirtualDisplay"
- Position and orient it in the scene (e.g., at
(0, 1.5, 2)facing the player)
Step 2: Add Component > DisplayXRDisplay
Step 3: Make your Main Camera a child of this object, or position it separately — the display's world transform is sent to the native plugin as the "scene transform" applied to raw eye positions.
Hierarchy:
VirtualDisplay <-- has DisplayXRDisplay
└── Main Camera <-- standard Camera component
Inspector tunables:
| Parameter | Default | Description |
|---|---|---|
| IPD Factor | 1.0 | Scales inter-eye distance |
| Parallax Factor | 1.0 | Scales eye X/Y offset from display center |
| Perspective Factor | 1.0 | Scales eye Z only (depth intensity without changing baseline) |
| Virtual Display Height | 0 | Virtual display height in meters. 0 = use physical display height. The inspector shows the computed virtual size. The parent transform's scale acts as zoom. |
When to use display-centric mode:
- Digital signage, museum exhibits, kiosks
- The virtual display is a physical object in the scene (e.g., a TV on a wall)
- You want the display's position and orientation to be an explicit scene element
Try it: Import the Display Scene sample from Package Manager for a ready-made tabletop turntable demo.
Both modes share a common set of tunables that the provider sends to the runtime's Kooima computation (XR_DXR_view_rig). Here's what each parameter does physically:
Scales the horizontal distance between left and right eye positions.
1.0= natural inter-pupillary distance from eye tracker0.5= half the real IPD (gentler stereo, less eye strain)2.0= double the real IPD (exaggerated depth, "macro" effect)0.0= mono rendering (both eyes at center)
Scales the eye's X and Y offset from the viewing axis (or display center).
1.0= natural head parallax0.0= no parallax (stereo still works via IPD, but no motion parallax)>1.0= exaggerated motion parallax
Scales the eye's Z position (distance from display) without changing the baseline.
1.0= natural depth<1.0= eyes appear closer to display (stronger perspective)>1.0= eyes appear farther (flatter perspective)
Sets the virtual display height in meters for the Kooima projection.
0= use the physical display's actual height (default)0.3= 30 cm virtual display (scene objects appear larger — magnifier effect)0.6= 60 cm virtual display (scene objects appear smaller)
The parent transform's scale acts as zoom: scaling up the DisplayXRDisplay object zooms into the scene.
Inverse convergence distance in 1/meters. Controls where the virtual screen plane sits relative to the camera. Objects at the convergence distance appear at the display surface; closer objects pop out, farther objects recede.
0= infinity (parallel projection — no convergence)2.0= screen plane at 0.5 m from camera1.0= screen plane at 1.0 m from camera- The inspector shows the equivalent distance in meters or "∞"
Note: Camera-centric FOV is inherited automatically from the Camera component. There is no separate FOV tunable.
Route a Canvas to a window-space composition layer that the DisplayXR compositor overlays on both eyes with per-eye disparity shift (renders pre-interlace).
- Create a Canvas (any render mode)
- Add Component > DisplayXRWindowSpaceUI to the Canvas
- Configure position and size in fractional window coordinates [0..1]:
| Parameter | Default | Description |
|---|---|---|
| Position X | 0.0 | Left edge of overlay in window (0 = left, 1 = right) |
| Position Y | 0.0 | Bottom edge (0 = bottom, 1 = top) |
| Width | 1.0 | Fractional width |
| Height | 1.0 | Fractional height |
| Disparity | 0.0 | Stereo disparity in pixels. 0 = at screen plane, positive = in front |
| Resolution | 512 | Render texture resolution (square) |
The overlay is submitted as XrCompositionLayerWindowSpaceDXR and composited by DisplayXR before display processing. This means 2D UI text stays sharp and is not interlaced — ideal for HUDs, menus, and status displays.
Buttons and sliders do not respond out of the box. The layer carries pixels, not input: the component renders your Canvas with a hidden offscreen camera, so Unity's
GraphicRaycasternever hits it. Import the Window Space UI Mouse Router sample and put the router on the same GameObject. Seedocs~/architecture/window-space-ui.md.
Press Play — Play Mode is the preview. With the DisplayXR Display provider active (the shipping path), Play Mode runs the provider itself: the same backend as a built app, weaving to the display in a dedicated editor window (#171). This gives true parity with built apps — provider behavior and bugs surface directly in the editor — with no separate preview session or Play/Stop-free workflow to manage.
Where Play Mode does not run the provider (it declines and logs a warning; Unity then renders normally, without stereo):
- macOS editor: off pending a Unity editor Metal fix (#204). Build and run a macOS player to see stereo.
- Any editor set to Vulkan: not supported. On Windows, switch the editor to D3D12 or D3D11; on Linux, build a player.
Rendering modes are enumerated dynamically from the runtime and depend on the connected display hardware; mode switching is app policy (see DisplayXRModeSwitch). The runtime status (resolution, physical dimensions, eye-tracking state, current mode) is visible in the DisplayXR rig inspectors and settings panel.
- File > Build Settings
- Select Windows, Mac, Linux platform
- Set Target Platform to Windows and Architecture to x86_64
- Verify in Player Settings > XR Plug-in Management > Standalone that DisplayXR Display is enabled
- Click Build or Build And Run
The build output includes displayxr_unity.dll in the Plugins/ folder alongside your executable.
- File > Build Settings
- Select macOS platform
- Verify DisplayXR Display is enabled in Standalone XR settings
- Click Build
The .app bundle includes displayxr_unity.bundle in its plugins folder.
- File > Build Settings, platform Windows, Mac, Linux, Target Platform Linux, Architecture x86_64; Graphics API Vulkan
- Verify DisplayXR Display is enabled in Standalone XR settings
- A transparent overlay app (one that asks for a transparent background, like a desktop avatar): tick Transparent Overlay App in the DisplayXR Manifest Settings asset
- Click Build
Next to the player, the build writes <name>.sh, a launcher: start the app with it, and point the app's .desktop Exec= line at it. At launch time it picks:
- Native Wayland (
-force-wayland), which gives correct 3D at fractional display scaling (e.g. 150 %), when all of these hold: a GNOME Wayland session; the DisplayXR GNOME Shell extension running, with window drag (it ships with thedisplayxr-runtimepackage); DisplayXR runtime 2.28.0 or newer; a Vulkan loader. A transparent overlay app also gets-popupwindow, so its transparent window has no title bar or shadow around it. - X11 (XWayland) otherwise (KDE, wlroots, no extension, an older runtime), and says why on stderr.
DISPLAYXR_LINUX_BACKEND=wayland or =x11 forces one. Other arguments are passed through to the player.
- File > Build Settings, platform Android
- Player Settings > Other Settings:
- Graphics APIs: Vulkan only (remove OpenGLES3). There is no fallback API on Android.
- Scripting Backend: IL2CPP; Target Architectures: ARM64 only
- Minimum API Level: 29 (Android 10) or higher
- Player Settings > XR Plug-in Management > Android: enable DisplayXR Display
- Click Build or Build And Run
Render path: see the Render Path table. The package adds what the player needs on its own:
- the runtime-discovery manifest entries (
Runtime/Plugins/Android/DisplayXR.androidlib); - the Khronos OpenXR loader for Android (1.1.63);
- the runtime's
VK_LAYER_DXR_queue_locklayer (needed for full frame rate); - R8 keep rules when Minify is on;
- Unity's stock splash screen turned off (the runtime shows its own).
The provider draws into its own SurfaceView above Unity's and binds it with XR_DXR_android_surface_binding. Pause/resume, rotation (configChanges) and window geometry are handled. Every touch reaches Unity, and a copy goes to the runtime (xrSubmitAndroidInputEventDXR). The samples' DisplayXRInputController turns touch into orbit (one finger), pinch dolly, two-finger pan and double-tap reset.
Known limits:
- Window-space UI panel: while one is shown, the frame rate drops to about 30 fps unless the GPU clock is high. The runtime blocks
xrEndFramefor frames with a window-space layer (displayxr-runtime#2356). - Zones: one 3D zone plus Local2D works. More than one 3D zone is not supported on Vulkan on any platform.
- Unity's own swapchain memory: Unity still allocates its own (hidden) swapchain, about 60 MB.
Screen.SetResolutioncan shrink it, but it changes the size everyScreenpixel consumer sees.
Logs: adb logcat -s DisplayXRUnity. Switches that need no rebuild: adb shell setprop debug.displayxr.unity_present 1 (Unity presents to its own surface again) and debug.displayxr.no_touch_submit 1 (no touch copy to the runtime).
Yes, you can build a Windows app from Unity for Mac. Unity's cross-compilation support handles this:
- Install the Windows Build Support module in Unity Hub:
- Unity Hub > Installs > your Unity version > Add Modules > Windows Build Support (Mono)
- In Unity: File > Build Settings > Windows, Mac, Linux
- Set Target Platform to Windows
- Build as normal
The plugin includes both platform binaries (displayxr_unity.dll for Windows, displayxr_unity.bundle for macOS). Unity automatically selects the correct one based on the build target.
Important: The built Windows .exe still requires the DisplayXR runtime installed on the target Windows machine — see Deploying to End Users. You cannot run the Windows build on macOS.
Your built app is a standard OpenXR application. It needs an OpenXR runtime on the target machine. The plugin is hardware-agnostic — it communicates only through the OpenXR API and does not depend on any specific display vendor SDK.
Two installers, in order:
1. DisplayXR Runtime (always required):
Install DisplayXRSetup-*.exe from the displayxr-runtime releases. Registers the OpenXR runtime JSON, drops the runtime DLLs at C:\Program Files\DisplayXR\Runtime\, sets HKLM\Software\Khronos\OpenXR\1\ActiveRuntime to the DisplayXR manifest, and auto-starts displayxr-service.exe at user logon.
The runtime ships with the sim_display plug-in (vendor-neutral SBS/anaglyph/blend fallback for any GPU). For real 3D hardware you also need the matching vendor plug-in below.
2. Leia SR plug-in (required for Leia SR hardware only):
Install DisplayXRLeiaSRSetup-*.exe from the displayxr-leia-plugin releases. Drops DisplayXR-LeiaSR.dll at C:\Program Files\DisplayXR\Plugins\LeiaSR\ and registers it at HKLM\Software\DisplayXR\DisplayProcessors\leia-sr (ProbeOrder=50). The runtime's registry-driven discovery picks it up at xrCreateInstance time; on Leia hardware it wins the probe and renders through the SR weaver, on non-Leia hardware it declines and the runtime falls back to sim_display.
Install order matters — the Leia plug-in installer hard-prereqs HKLM\Software\DisplayXR\Runtime\InstallPath and refuses install if the runtime isn't already present.
The plug-in cascade-uninstalls with the runtime: uninstalling the runtime via Add/Remove Programs automatically uninstalls all registered vendor plug-ins (#286 fixed cleanup in runtime v1.4.1+).
Why two installers? Pre-v1.4.0 the runtime installer bundled the Leia plug-in. As of v1.4.0 (
ADR-019/ #263), vendor display drivers ship as separate plug-in installers from their own repos so the runtime stays vendor-source-clean and additional vendors don't bloat the runtime install set.
Or, for development/testing without installation, set the environment variable to your dev runtime JSON:
set XR_RUNTIME_JSON=C:\path\to\openxr_displayxr-dev.json
Set before launching the app:
export XR_RUNTIME_JSON=/path/to/DisplayXR-macOS/openxr_displayxr.jsonIf you have a runtime symlink at ~/Library/Application Support/openxr/1/active_runtime.json (the OpenXR loader's standard discovery path), it works for the Unity editor but not for unsigned built .app bundles. macOS' file-access protections block unsigned apps from reading other apps' Application Support directories, so the loader can't find the runtime manifest. Symptom:
Loading OpenXR loader library at path: openxr_loader
[XR] [FAILURE] xrCreateInstance: XR_ERROR_RUNTIME_UNAVAILABLE
[DisplayXR] provider not active.
Two ways around it:
1. Set XR_RUNTIME_JSON explicitly when launching (works with any build, signed or not):
XR_RUNTIME_JSON=/path/to/openxr_displayxr.json /path/to/MyApp.app/Contents/MacOS/MyApp
2. Code-sign the .app so macOS grants it normal user-file access. Ad-hoc signing is enough for local development — no Apple Developer account needed:
codesign --deep --force --sign - MyApp.app
After signing, the runtime symlink is reachable and you can launch the app without XR_RUNTIME_JSON.
For distributing to other users, sign with a Developer ID and notarize:
codesign --deep --force --sign "Developer ID Application: Your Name (TEAMID)" \ --options runtime --timestamp MyApp.app xcrun notarytool submit MyApp.app --apple-id [email protected] --team-id TEAMID --wait xcrun stapler staple MyApp.app
The device needs the DisplayXR runtime APK: v2.47.0 or newer. v2.53.0 is the tested version. On v2.47.0 everything works except the touch copy to the runtime, which needs xrSubmitAndroidInputEventDXR (first shipped in v2.47.1); the provider logs that once and carries on. On a device whose display needs a vendor plug-in, use the runtime APK variant that bundles it (ADR-038), installed per the runtime's Android guide. Launch the runtime app once after installing it so its broker is registered. The Unity APK finds the runtime through the Khronos loader. Nothing else needs installing.
| Situation | What the plugin does | How an app detects it |
|---|---|---|
| No runtime installed (Windows, macOS, Linux) | The XR loader declines before creating anything and logs [DisplayXR] No DisplayXR runtime found on this machine — XR disabled, running as a standard 2D application. Unity renders normally into its own window. |
DisplayXRRuntime.IsInstalled is false. It needs no session and is safe to read from a [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] method, which is early enough to choose 2D content or skip XR init. DisplayXRProvider.IsRunning stays false and SessionStarted never fires. |
| No runtime installed (Android) | There is no pre-session check on Android, so the loader does not decline; the failure is an xrCreateInstance error in logcat (adb logcat -s DisplayXRUnity). What the user sees is not yet documented. |
DisplayXRRuntime.IsInstalled is always false on Android and says nothing there; do not use it. DisplayXRProvider.IsRunning stays false. |
| Another vendor's OpenXR runtime is the active one | IsInstalled cannot tell (it only resolves a runtime manifest file), so the loader goes ahead and the session then fails to start. What the user sees is not yet documented. |
DisplayXRRuntime.IsInstalled is true; DisplayXRRuntime.ResolvedManifestPath shows which manifest was found. DisplayXRProvider.IsRunning stays false and SessionStarted never fires. |
| Runtime installed, no 3D panel | Nothing changes in the plugin. The runtime falls back to its simulated display (sim_display: side-by-side, anaglyph or blend output in a regular window; see Testing Without Hardware), and the session runs as usual. |
The session is up (SessionStarted, IsRunning). DisplayXRProvider.TryGetDisplayInfo returns the display geometry the runtime reports. A way to tell a simulated display from a real panel is not yet documented. |
| The panel switches between 2D and 3D | The session keeps running. | DisplayXRProvider.HardwareDisplayStateChanged (bool) fires when the physical 2D/3D state flips. RenderingModeChanged (previous, current mode index) fires when the active rendering mode changes. |
| Eye tracking lost or regained | The session keeps running. What the runtime renders while no viewer is tracked is the runtime's behaviour and is not yet documented here. | DisplayXRProvider.EyeTrackingStateChanged (isTracking, activeMode: 0 = managed, 1 = manual) fires on every change; DisplayXRProvider.IsEyeTracked holds the latest value. |
| Session stopped (session loss, the provider stopping, the editor's dock/undock restart, an Android pause and resume) | Everything the app pushed into the session is gone with it: display mode, rendering mode, eye-tracking mode. Requests made while no session is running return false and are dropped. |
DisplayXRProvider.SessionStopped fires once and IsSessionReady goes false. After a restart SessionStarted fires again: re-apply your requests there (DisplayXRProvider.WhenRunning is a one-shot and does not re-run). |
The runtime asks the app to exit (session state EXITING or LOSS_PENDING, for example the shell closing the app) |
The plugin logs [DisplayXR] runtime requested session exit → Application.Quit() and calls Application.Quit(). |
Unity's own quit callbacks (Application.quitting). |
The DisplayXRProvider events fire only while the provider session is running (SessionStarted / SessionStopped bracket that window). They are dispatched from the provider driver's per-frame update, on the main thread.
The sim_display driver provides a software 3D display for development. When no physical 3D display is present, the runtime falls back to sim_display automatically — you don't need to enable it. Optionally pick the sim output format with SIM_DISPLAY_OUTPUT:
# Windows set SIM_DISPLAY_OUTPUT=sbs # side-by-side stereo # or: anaglyph (red-cyan), blend (50/50 alpha) # macOS export SIM_DISPLAY_OUTPUT=sbs
With sim_display:
- Eye tracking is simulated via keyboard/mouse (qwerty driver)
- Display dimensions are synthetic (configurable)
- Output renders as SBS, anaglyph, or alpha-blend in a regular window
This lets you develop and test the full stereo pipeline on any machine.
| Symptom | Cause | Fix |
|---|---|---|
Console: [DisplayXR] No DisplayXR runtime found on this machine |
No runtime installed (the DisplayXR settings page says "No OpenXR runtime found"), or XR_RUNTIME_JSON is set and points to a missing file (the settings page shows the path with "File Exists: No"; when the variable is set, it wins and the installed runtime is not looked up) |
Install the DisplayXR runtime, or set XR_RUNTIME_JSON to an existing runtime JSON before launching Unity |
| Black screen | DisplayXR not enabled | Check Project Settings > XR Plug-in Management > Standalone > DisplayXR Display, and Initialize XR on Startup. |
| Scene renders 2D side-by-side on Leia hardware (no depth) | Leia plug-in not installed/registered | Install DisplayXRLeiaSRSetup-*.exe from displayxr-leia-plugin. Verify HKLM\Software\DisplayXR\DisplayProcessors\leia-sr exists. Without the plug-in, the runtime falls back to sim_display (SBS output) on any hardware. |
| No stereo (flat image) | Eye tracking not running | Verify the DisplayXR runtime is configured with a display that supports eye tracking, or use sim_display for testing |
| Stereo looks wrong | Tunables misconfigured | Click Reset to Defaults in the rig inspector. Defaults: IPD Factor 1, Parallax Factor 1; display-centric adds Perspective Factor 1 and Virtual Display Height 0; camera-centric adds Inv. Convergence Distance 0 |
| UPM "cannot add package from git URL" (Windows) | Git not installed or not in PATH | Install Git for Windows, restart Unity. Verify with git --version in a terminal. |
| UPM "cannot add package from git URL" (macOS) | GUI apps can't find Homebrew Git | Run xcode-select --install to set up /usr/bin/git, or launch Unity from terminal (open -a Unity). Check ~/Library/Logs/Unity/upm.log for details. |
DllNotFoundException: displayxr_unity |
Native plugin not found by Unity | Ensure the plugin binaries are in Runtime/Plugins/Windows/x64/ or Runtime/Plugins/macOS/. On a Linux or Android build, a missing binary usually means the package was installed from a #vX.Y.Z source tag instead of #upm/vX.Y.Z (see Installing the Plugin) |
macOS: XR_ERROR_RUNTIME_UNAVAILABLE in built .app despite the symlink working in editor |
Unsigned .app bundles can't read ~/Library/Application Support/openxr/ due to macOS sandbox protections |
Either set XR_RUNTIME_JSON when launching, or ad-hoc sign with codesign --deep --force --sign - MyApp.app. See macOS Deployment. |
| HDRP stereo artifacts | Single-pass instanced issue | Verify both eye views have correct FOVs in Frame Debugger |
| DisplayXR settings page says "Not connected" | No session is running: display info only appears in Play Mode with DisplayXR Display enabled | Enter Play Mode. If it still says "Not connected", look in the Console for a [DisplayXR] warning (no runtime found, macOS editor, Vulkan editor), then in the log files |
| Play Mode shows black | Runtime connected but no output | Read the provider log and the runtime log (paths under Log Files); verify sim_display or hardware is configured. If Unity and the runtime are on different GPUs (hybrid laptops), the provider log says so and how to align them |
VK_ERROR_EXTENSION_NOT_PRESENT on macOS |
MoltenVK limitation | Known issue — use sim_display for testing |
| Log | Where | What is in it |
|---|---|---|
Unity Console / Player.log |
Windows player: %USERPROFILE%\AppData\LocalLow\<Company>\<Product>\Player.log. macOS player: ~/Library/Logs/<Company>/<Product>/Player.log. Linux player: ~/.config/unity3d/<Company>/<Product>/Player.log |
The plugin's C# messages, prefixed [DisplayXR] |
| Provider (native plugin) log | Windows: %TEMP%\displayxr_prov_native.log. macOS / Linux: $TMPDIR/displayxr_prov_native.log (/tmp/ when TMPDIR is unset). Android: logcat, adb logcat -s DisplayXRUnity |
Lines prefixed [DisplayXR-PROV]: session start, which extensions the runtime advertises, session state changes. The file is appended to on every run |
| Runtime log | Windows: %LOCALAPPDATA%\DisplayXR\DisplayXR_<exe>.<pid>_<timestamp>.log. Other platforms: see the runtime's documentation |
The runtime's own messages, including why it refused a request |
Enable Log Eye Tracking on the DisplayXRCamera or DisplayXRDisplay component to see per-frame eye positions in the Console:
[DisplayXR] Eyes: L=(0.032, 0.001, 0.504), R=(-0.031, 0.001, 0.504), tracked=True
With the provider active, the DisplayXRCamera / DisplayXRDisplay inspectors and the DisplayXR settings panel show runtime status:
- Connected display properties (resolution, physical size, nominal viewer distance)
- Eye tracking status
DisplayXR ships as a custom IUnityXRDisplay display provider (the shipping path). The provider
registers a DisplayXR Display subsystem, owns an OpenXR session on Unity's graphics device, and hands
Unity's rendered eye textures to the runtime compositor — Unity keeps rendering the scene (BiRP/URP/HDRP,
SPI/Multi-Pass), the runtime owns the Kooima math (XR_DXR_view_rig).
Unity Editor / Player
┌──────────────────────────────────────────────────────────┐
│ C# Layer │
│ │
│ DisplayXRDisplayLoader : XRLoaderHelper │
│ starts the "DisplayXR Display" display subsystem │
│ DisplayXRProvider / DisplayXRProviderDriver │
│ push rig tunables, modes/zones, events (dxr_prov_*) │
│ │
│ DisplayXRCamera DisplayXRDisplay │
│ (camera-centric) (display-centric) │
│ │
│ DisplayXRWindowSpaceUI / DisplayXRLocal2D (2D layers) │
└──────────────────────────────────────────────────────────┘
│ P/Invoke (displayxr_unity.dll / .bundle / .so)
▼
┌──────────────────────────────────────────────────────────┐
│ Native Plugin (C/C++) │
│ Display provider (IUnityXRDisplay): │
│ session on Unity's device → render params (SPI/MP) │
│ xrLocateViews → chain XR_DXR_view_rig descriptor │
│ xrEndFrame → submit projection + zone + 2D layers │
└──────────────────────────────────────────────────────────┘
│ Standard OpenXR API
▼
┌──────────────────────────────────────────────────────────┐
│ DisplayXR Runtime │
│ Compositor → Display Processor → Output │
└──────────────────────────────────────────────────────────┘
See docs~/architecture/xr-display-provider.md for the full
provider design, and docs~/adr/ADR-007-render-path-by-view-count.md
for the roadmap to many-view (light-field / quilt) displays.
Eye Tracker → raw positions in DISPLAY space
↓
Scene Transform (parent camera pose, zoom)
↓
Tunables (IPD factor, parallax, perspective, virtual display height / inv. convergence distance)
↓
Kooima Asymmetric Frustum, computed by the runtime → per-eye XrView {pose, fov}
↓
Provider builds the per-eye projection matrix → Unity renders stereo
| Path | Purpose |
|---|---|
Runtime/Provider/ |
Display provider (shipping path): DisplayXRDisplayLoader (XR Plug-in Management loader), DisplayXRProvider/DisplayXRProviderDriver (facade + per-frame driver), DisplayXRProviderNative (P/Invoke) |
Editor/Provider/DisplayXRDisplayPackage.cs |
Registers the "DisplayXR Display" provider toggle in XR Plug-in Management |
Runtime/DisplayXRCamera.cs |
Camera-centric stereo rig MonoBehaviour |
Runtime/DisplayXRDisplay.cs |
Display-centric stereo rig MonoBehaviour |
Runtime/DisplayXRDisplayInfo.cs |
Display properties data struct |
Runtime/DisplayXRTunables.cs |
Tunable parameters struct |
Runtime/DisplayXRWindowSpaceUI.cs |
2D UI overlay routing |
Runtime/DisplayXRNative.cs |
P/Invoke bindings to native plugin |
Runtime/Plugins/Windows/x64/ |
Windows native plugin (DLL) |
Runtime/Plugins/macOS/ |
macOS native plugin (displayxr_unity.bundle, Universal) |
Editor/DisplayXRDisplayEditor.cs |
Custom inspector for display-centric mode |
Editor/DisplayXRCameraEditor.cs |
Custom inspector for camera-centric mode |
Editor/DisplayXRSettingsProvider.cs |
Project Settings page |
native~/ |
Native C/C++ plugin source + CMakeLists.txt |