Version: 1.0.2 Target Device: Youbiquo Leonardo XR Base SDK: Snapdragon Spaces 1.0.4
The samples are organized into two sections:
The Core Samples package can be imported via Window > Package Manager > Snapdragon Spaces > Core Samples. After importing, add all scenes to the build through Window > XR > Snapdragon Spaces > Add Scenes to Build Settings.
The LeonardoXR Core Samples package can be imported via Window > Package Manager > LeonardoXR > Core Samples. After importing, the scenes are available in the Samples/LeonardoXR/[version]/Core Samples/Scenes/ folder.
⚠️ Documentation in preparation.
This sample demonstrates how to access synchronized frames from Leonardo XR’s dual cameras using the Dual Camera Access feature.
Scene:
Samples/LeonardoXR/.../Core Samples/Scenes/DualCameraAccessPrerequisites: The Dual Camera Access feature enabled in the LeonardoXR feature group.
⚠️ Documentation in preparation.
This sample demonstrates how to load and run a neural inference model on Leonardo XR’s NPU using the QNN Inference Plugin.
Scene:
Samples/LeonardoXR/.../Core Samples/Scenes/QnnInferencePrerequisites: The QNN Inference Plugin feature enabled in the LeonardoXR feature group.
⚠️ Documentation in preparation.
This sample demonstrates how to intercept low-level OpenXR functions using the InterceptOpenXRFunction feature.
Scene:
Samples/LeonardoXR/.../Core Samples/Scenes/InterceptOpenXRFunctionPrerequisites: The Intercept OpenXR Function feature enabled in the LeonardoXR feature group.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/Anchor
This sample demonstrates how to create and destroy local anchors to precisely track a point in the real world. It requires the Spatial Anchors feature enabled in OpenXR.
A transparent positioning gizmo floats 1 meter in front of the camera. When Place anchor on surfaces is enabled, a ray is cast forward every frame. When a surface is hit, the gizmo turns yellow. Tapping the touchpad or using the gaze interactor creates an ARAnchor with a tracking gizmo.
private void OnAnchorsChanged(ARAnchorsChangedEventArgs args)
{
foreach (var anchor in args.updated)
{
Destroy(anchor.transform.GetChild(0).gameObject);
var newGizmo = Instantiate(
anchor.trackingState == TrackingState.None
? GizmoUntrackedAnchor
: GizmoTrackedAnchor);
newGizmo.transform.SetParent(anchor.transform, false);
}
}
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/HandTracking
Demonstrates hand joint visualization and gesture recognition using the QCHT interaction package. Requires the Hand Tracking feature and the QCHT / XR Hands packages.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/HitTesting
Demonstrates continuous hit testing via raycasting against real-world planes and meshes using ARRaycastManager. The sample shows how to place virtual objects on detected surfaces.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/ImageTracking
Demonstrates tracking of printed reference images and overlaying virtual content. Supports static and mutable image libraries.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/PlaneDetection
Demonstrates the detection and visualization of horizontal and vertical planes using ARPlaneManager. Supports optional detection modes and convex hull planes.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/CameraFrameAccess
Demonstrates the retrieval of raw camera frames (YUV / YUYV) from the device using ARCameraManager. Includes sensor extrinsics, camera count queries, and GPU-accelerated frame access.
Important: Requires Allow ‘unsafe’ Code enabled in Player Settings.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/SpatialMeshing
Demonstrates real-time environmental meshing using ARMeshManager. Includes an opacity slider and the optional SpacesARMeshManagerConfig component.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/QRCodeTracking
Demonstrates QR code scanning and tracking via SpacesQrCodeManager. Multiple tracking modes are available.
Scene: Samples/Snapdragon Spaces/.../Core Samples/Scenes/XRInteractionToolkit
Demonstrates standard XR Interaction Toolkit interactions (ray interactors, direct interactors, teleportation) in a Snapdragon Spaces project. Compatible with LeonardoXR configuration.
The Spaces Composition Layer renders textures directly to the HMD, bypassing post-processing steps. Supported geometry types are Quad, Cylinder, Sphere, and Cube. Useful for high-resolution UI or elements that must maintain quality regardless of scene effects.
| Sample | Description |
|---|---|
| Display Refresh Rate | Runtime querying and setting of the display refresh rate via the XR_EXT_display_refresh_rate extension. |
| Performance Settings | Setting CPU/GPU performance levels via the XR_EXT_performance_settings extension. |