Getting Started — LeonardoXR SDK

Getting Started — LeonardoXR SDK

Introduction

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.


Required Software

Before you begin, ensure that you have installed the following software and packages at the specified versions:

Software / PackageVersion
Unity HubLatest available
Unity Editor6000.0.37f1
LeonardoXR SDK1.0.2
Snapdragon Spaces SDK1.0.4
OpenXR Plugin1.15.1
AR Foundation6.2.1
XR Interaction Toolkit3.3.0
XR Hands1.7.2
UniTask2.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.


Create a New Project

  1. Open Unity Hub and click on New Project.
  2. Select the Universal 3D template.
  3. Name the project (e.g., LeonardoXR_Test) and choose the destination folder.
  4. Click on Create Project.

After creation, Unity will open the project with a sample scene in the Hierarchy panel.


Convert the Platform to Android

  1. From the main menu, select File > Build Profiles.
  2. In the Build Profiles window, select Android from the Platform list.
  3. Click on Switch Platform and wait for the process to complete.
  4. Close the Build Profiles window.

Install the Required Packages

Open the Package Manager via Window > Package Manager. Select Unity Registry in the left sidebar and install the following packages by clicking Install:

  • AR Foundation — 6.2.1
  • XR Interaction Toolkit — 3.3.0
  • XR Hands — 1.7.2
  • UniTask — 2.5.10

Note: XR Interaction Toolkit might require restarting the editor after installation. If the prompt “Enable the new input system?” appears, click Yes.


Install Snapdragon Spaces SDK

  1. Download and extract Snapdragon Spaces SDK v1.0.4 from the official portal: https://spaces.qualcomm.com/developer/vr-mr-sdk/.
  2. Open the Package Manager (Window > Package Manager).
  3. Click the + button and select Add package from tarball…
  4. Navigate to the extracted folder and select the .tgz file.
  5. Click Open. The installation will start automatically.

During the installation, two prompts may appear:

  • “Enable the new input system?” → click Yes.
  • “XR Interaction Layer Mask Update Required” → since this is a new project, click I Made a Backup, Go Ahead!

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 .tgz file into the Packages folder of your project before adding it.


Install LeonardoXR SDK

  1. Download and extract LeonardoXR SDK v1.0.2 from the Youbiquo Developer Portal.
  2. Open the Package Manager (Window > Package Manager).
  3. Click the + button and select Add package from tarball…
  4. Navigate to the LeonardoXR SDK compressed file and select the .tgz file.
  5. Click Open. LeonardoXR SDK will be installed.

Configure XR Plugin Management and OpenXR

Open Project Settings

Go to Edit > Project Settings and select XR Plug-in Management in the left sidebar.

Enable OpenXR and Snapdragon Spaces

  1. Click the Android tab (top right in the window).
  2. In the Plug-in Providers section, make sure the following are checked:
    • OpenXR
    • Snapdragon Spaces feature group

Configure OpenXR Features

  1. Click OpenXR in the left sidebar.
  2. In the Snapdragon Spaces features list, enable only Base Runtime and disable all others.
    Advanced features (Hit Testing, Plane Detection, etc.) can be enabled later as needed for your project.

Warning: To correctly enable Hand Tracking on LeonardoXR, the Hand Tracking Subsystem option must be activated in the All Features section of OpenXR.

Add LeonardoXR Feature Group

  1. Return to the XR Plug-in Management > Android section.
  2. In the Plug-in Providers list, also check LeonardoXR feature group.

Run Project Validation

  1. In the Project Settings sidebar, click Project Validation.
  2. The window will display a list of configuration errors to resolve.
  3. Click Fix All to resolve them automatically.

Some fixes may require restarting the editor. Re-run the validation after restarting to verify that all errors have been resolved.


Import the Samples

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.

Samples to import per package

XR Hands:

  • Gestures
  • Hand Visualizer

XR Interaction Toolkit:

  • Starter Assets
  • Hand Interaction Demo

Snapdragon Spaces:

  • Core Samples

LeonardoXR:

  • Core Samples

After importing all the samples, add the scenes to the build via Window > XR > Snapdragon Spaces > Add Scenes to Build Settings.


Configure URP

Graphics and Quality Settings

  1. Open Edit > Project Settings > Graphics.
  2. Under Default Render Pipeline, click the circle and select Mobile_RPAsset (Universal Render Pipeline Asset).
  3. Navigate to Project Settings > Quality.
  4. In the Levels section, ensure that Mobile has a green checkmark in the Android column. If it is not present, click the Default dropdown in the Android column and select Mobile.
  5. Close Project Settings.

Configure URP Assets

  1. In the Assets/Settings folder, select Mobile_Renderer.

  2. In the Inspector panel for Mobile_Renderer, apply the following changes:

    • Rendering → Depth Priming Mode: set to Disabled
    • Shadows → Transparent Receive Shadows: uncheck
    • Post-processing → Enabled: uncheck
    • Renderer Feature → SSAO: ensure it is disabled or removed
  3. In the Assets/Settings folder, select Mobile_RPAsset.

  4. In the Inspector panel for Mobile_RPAsset, apply the following changes:

    • HDR: disable
    • Anti Aliasing (MSAA): set to 4x

Play In Editor Configuration

This section describes how to configure the project to support Play-In-Editor development, reducing the need to deploy to the device with each change.

Prerequisites

Complete the basic configuration above before proceeding.

OpenXR Project Settings

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:

  • Without Dual Render Fusion → must be enabled. If disabled, warnings about missing subsystems will appear.
  • With Dual Render Fusion → must be disabled. If enabled, a “loader already initialized” warning will appear.

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.

Enable Base Runtime Feature for Windows/Mac/Linux

Go to Edit > Project Settings > XR Plug-in Management > OpenXR (Windows, Mac, Linux tab) and enable the Base Runtime feature.

Scene Configuration — Spaces XR Simulator

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.

PropertyDescription
Start ConnectedSimulates active and connected headsets (Dual Render Fusion only).
Invert Sim Camera DisplaySwaps the phone and headset displays in the editor (Dual Render Fusion only).

Dual Render Fusion Editor Shortcuts

EventShortcutMenu
Connect GlassesAlt-Shift-CWindow > XR > Snapdragon Spaces > DRF > Simulation > Connect Glasses
Disconnect GlassesAlt-Shift-DWindow > XR > Snapdragon Spaces > DRF > Simulation > Disconnect Glasses
Glasses ActiveAlt-Shift-GWindow > XR > Snapdragon Spaces > DRF > Simulation > Glasses Active
Glasses IdleAlt-Shift-HWindow > XR > Snapdragon Spaces > DRF > Simulation > Glasses Idle

Tip: All final behavior must always be verified on the physical device, not just in the editor.


Installation Complete

The project is now configured for development on LeonardoXR. In the following documents, you will find guides for:

  • VR/MR Configuration
  • Available Features (Spaces and LeonardoXR)
  • Reference Samples
  • Interaction (XR Interaction Toolkit, XR Hands)
  • Advanced Features