This guide explains how to set up a Unity project for development on the Leonardo XR, Youbiquo’s AR headset based on Snapdragon Spaces. The goal is to familiarize yourself with the SDK configuration for developing applications on Leonardo. The next guide will demonstrate how to interact with controllers and hands.
Leonardo XR runs on Android 12 and follows a programming workflow familiar to anyone who has already developed Android applications.
Before you begin, ensure that you have installed the following software and packages at the specified versions:
| Software / Package | Version |
|---|---|
| Unity Hub | Latest available |
| Unity Editor | 6000.0.37f1 |
| LeonardoXR SDK | 1.0.2 |
| Snapdragon Spaces SDK | 1.0.4 |
| OpenXR Plugin | 1.15.1 |
| AR Foundation | 6.2.1 |
| XR Interaction Toolkit | 3.3.0 |
| XR Hands | 1.7.2 |
| UniTask | 2.5.10 |
| VS Code, Visual Studio or equivalent editor | — |
Note on the OpenXR plugin: Unlike the standard Snapdragon Spaces guide (which recommends v1.10.0 for Unity 2022), with Unity 6 and LeonardoXR you should use OpenXR 1.15.1. Do not modify this version manually; the Package Manager handles it automatically through the SDK’s dependencies.
LeonardoXR_Test) and choose the destination folder.After creation, Unity will open the project with a sample scene in the Hierarchy panel.
Open the Package Manager via Window > Package Manager. Select Unity Registry in the left sidebar and install the following packages by clicking Install:
Note: XR Interaction Toolkit might require restarting the editor after installation. If the prompt “Enable the new input system?” appears, click Yes.
.tgz file.During the installation, two prompts may appear:
The editor will restart. This is normal behavior, not a crash.
Tip: To reference the package with a relative path (recommended for version control), copy the
.tgzfile into thePackagesfolder of your project before adding it.
.tgz file.Go to Edit > Project Settings and select XR Plug-in Management in the left sidebar.
Warning: To correctly enable Hand Tracking on LeonardoXR, the Hand Tracking Subsystem option must be activated in the All Features section of OpenXR.
Some fixes may require restarting the editor. Re-run the validation after restarting to verify that all errors have been resolved.
Before creating your own scenes, it is useful to import the samples included in the various packages. For each package: open Window > Package Manager, select In Project, select the package, expand the Samples section, and click Import.
XR Hands:
XR Interaction Toolkit:
Snapdragon Spaces:
LeonardoXR:
After importing all the samples, add the scenes to the build via Window > XR > Snapdragon Spaces > Add Scenes to Build Settings.
In the Assets/Settings folder, select Mobile_Renderer.
In the Inspector panel for Mobile_Renderer, apply the following changes:
DisabledIn the Assets/Settings folder, select Mobile_RPAsset.
In the Inspector panel for Mobile_RPAsset, apply the following changes:
4xThis section describes how to configure the project to support Play-In-Editor development, reducing the need to deploy to the device with each change.
Complete the basic configuration above before proceeding.
Go to Edit > Project Settings > XR Plug-in Management and select the Windows, Mac, Linux tab.
Initialize XR On Startup: The value must match that of the Android tab:
XR Simulation (Optional): Enable XR Simulation on the Windows/Mac/Linux tab to use AR Foundation simulation environments.
Note: XR Simulation subsystems are for editor use only and may not cover 100% of Snapdragon Spaces functionality. QR Code Tracking does not have an equivalent simulation subsystem.
Go to Edit > Project Settings > XR Plug-in Management > OpenXR (Windows, Mac, Linux tab) and enable the Base Runtime feature.
Add the Spaces XR Simulator component to a root GameObject in the scene. The component persists across scene changes (DontDestroyOnLoad) and only one instance can exist at a time.
| Property | Description |
|---|---|
| Start Connected | Simulates active and connected headsets (Dual Render Fusion only). |
| Invert Sim Camera Display | Swaps the phone and headset displays in the editor (Dual Render Fusion only). |
| Event | Shortcut | Menu |
|---|---|---|
| Connect Glasses | Alt-Shift-C | Window > XR > Snapdragon Spaces > DRF > Simulation > Connect Glasses |
| Disconnect Glasses | Alt-Shift-D | Window > XR > Snapdragon Spaces > DRF > Simulation > Disconnect Glasses |
| Glasses Active | Alt-Shift-G | Window > XR > Snapdragon Spaces > DRF > Simulation > Glasses Active |
| Glasses Idle | Alt-Shift-H | Window > XR > Snapdragon Spaces > DRF > Simulation > Glasses Idle |
Tip: All final behavior must always be verified on the physical device, not just in the editor.
The project is now configured for development on LeonardoXR. In the following documents, you will find guides for: