Version: 1.0.2 Target Device: Youbiquo Leonardo XR Base SDK: Snapdragon Spaces 1.0.4
This section covers advanced configurations and features available on LeonardoXR, divided into general Snapdragon Spaces platform features and proprietary advanced features of Leonardo XR.
To use an interaction profile not included in the Snapdragon Spaces plugin:
See also Interaction Package Guides for the configuration of recommended profiles on LeonardoXR.
Describes how to build a custom Android controller archive (.aar) using the Custom Controller Package — the Android Studio project included in the developer package.
.aar file..aar file into the Unity project as a native Android plugin (into the Assets/Plugins/Android folder).Note: Adding a custom controller archive may cause Gradle caching errors. If build errors occur, delete the
Temp/gradleOutfolder and rebuild.
The XR_EXT_display_refresh_rate extension allows querying and setting the display refresh rate at runtime.
using Qualcomm.Snapdragon.Spaces;
BaseRuntimeFeature baseRuntime = OpenXRSettings.Instance
.GetFeature<BaseRuntimeFeature>();
float currentHz = baseRuntime.GetDisplayRefreshRate();
Debug.Log($"Current refresh rate: {currentHz} Hz");
float[] supportedRates = baseRuntime.GetSupportedDisplayRefreshRates();
foreach (float rate in supportedRates)
Debug.Log($"Supported: {rate} Hz");
baseRuntime.RequestDisplayRefreshRate(90.0f);
Note: The required refresh rate must be one of those returned by
GetSupportedDisplayRefreshRates(). Unsupported values are ignored.
The SpacesThreadUtility component improves thread scheduling priority on Android, resulting in more consistent frame timing.
Add the SpacesThreadUtility component to a persistent GameObject in the scene (for example, the same GameObject that hosts the AR Session or the XR Origin).
// SpacesThreadUtility requires no configuration:
// simply add it as a component and it will activate automatically.
// It affects the main Unity threads during initialization.
The use of SpacesThreadUtility is recommended in all LeonardoXR applications that exhibit framerate jitter or frame timing variability, particularly in scenes with heavy rendering or multiple active AR subsystems.
The XR_EXT_performance_settings OpenXR extension exposes CPU and GPU performance-level hints via a new method in BaseRuntimeFeature.
Performance levels range from PowerSavings (maximum power saving) to Boost (maximum performance):
| Level | Description |
|---|---|
PowerSavings |
Reduces CPU/GPU clocks to the minimum necessary. Useful for simple scenes or static UIs. |
SustainedLow |
Sustained performance at a low level. |
SustainedHigh |
Sustained performance at a high level. Recommended for most AR applications. |
Boost |
Maximum performance for short periods (not sustainable long-term). |
using Qualcomm.Snapdragon.Spaces;
using UnityEngine.XR.OpenXR;
BaseRuntimeFeature baseRuntime = OpenXRSettings.Instance
.GetFeature<BaseRuntimeFeature>();
// Set CPU and GPU to SustainedHigh
baseRuntime.SetPerformanceLevel(
PerformanceDomain.Cpu,
PerformanceLevel.SustainedHigh);
baseRuntime.SetPerformanceLevel(
PerformanceDomain.Gpu,
PerformanceLevel.SustainedHigh);
Note: The Boost level consumes significantly more power and may cause thermal throttling if sustained for long periods. Use it only for critical, short-duration operations (e.g., loading a heavy scene).
⚠️ Documentation under preparation.
This section will cover advanced usage of the QNN (Qualcomm Neural Network) Inference Plugin on Leonardo XR, including:
- Model preparation and conversion (ONNX → QNN format).
- Runtime model loading via plugin APIs.
- NPU inference execution with input/output tensor management.
- Memory management and throughput optimization.
- Inference performance debugging and profiling.
- Use cases: object detection, pose estimation, real-time segmentation.
Detailed documentation will be available in a future release.
⚠️ Documentation under preparation.
This section will cover advanced usage of the Intercept OpenXR Function mechanism on Leonardo XR, including:
- OpenXR interception layer architecture.
- Registration of custom handlers for specific OpenXR functions.
- Use cases: rendering pipeline override, injection of custom data into the XR layer, low-level debugging of OpenXR behavior.
- Security and stability considerations.
- Interaction with other components of the LeonardoXR SDK.
This feature is intended for developers with direct experience in low-level OpenXR APIs. Detailed documentation will be available in a future release.