Skip to main content
Version: 1.0

Manual Unity Setup Guide

Manual Project Setup

It is recommended when installing Snapdragon Spaces to go through the configuration tool in order set up the project. However, to manually set up a Snapdragon Spaces project or to learn more about the project setup, follow this guide.

Change the Project Settings

To enable the Snapdragon Spaces OpenXR Plug-in, navigate to the project settings under Edit > Project Settings > XR Plug-in Management and open the Android tab. Check the OpenXR plug-in as well as the Snapdragon Spaces feature group. Initially, there will be some project settings that have to be updated/fixed. To do so, click on the red exclamation mark next to OpenXR to step into the OpenXR Project Validation window. Click on the fix buttons next to the entries to apply the needed project settings. Apply the setting to enable both Input Systems last, as this may require a restart of the Editor.

OpenXR Project Validation
Play In Editor settings

See the Play In Editor Setup Guide for project settings which will speed up development.

Enable Spaces Features

Enable the features in the OpenXR settings that should be active during runtime. The current supported features and the respective AR Foundation manager or XR subsystem that can be used with it, is listed in the table below.

FeatureAR Foundation/Spaces ManagerXR Subsystem
Base RuntimeAR SessionXRSessionSubsystem
Camera Frame AccessAR Camera ManagerXRCameraSubsystem
Hit TestingAR Raycast ManagerXRRaycastSubsystem
Image TrackingAR Tracked Image ManagerXRImageTrackingSubsystem
Plane DetectionAR Plane ManagerXRPlaneSubsystem
Spatial AnchorsAR Anchor ManagerXRAnchorSubsystem
Spatial MeshingAR Mesh ManagerXRMeshSubsystem
OpenXR Project Features

Add Feature Usage Data to the Android Manifest

The launcher settings panel (Edit > Project Settings > Snapdragon Spaces Launcher Settings) is used to add data to the Android Manifest, which may then be consumed by Snapdragon Spaces enabled hardware and software to retrieve the requirements for the application. The current features that can be declared as required and/or supported are Hand Tracking, Eye Tracking, Passthrough, Controllers, and Room Scale. If the uses-feature tag is present, but the required attribute is set to false, it means that the application is capable of using the feature but doesn't require it to function properly. For more information on this topic, refer to the Android documentation.

Snapdragon Spaces Launcher Settings
danger

By default, all the uses-feature values are set to true, if the application does not use any of the features, ensure those features are set to false.

Import the Samples

The Snapdragon Spaces SDK package comes with sample assets to showcase how to use the perception features included in the package. To import them, simply pick the package in the package manager (located in the menu bar under Window > Package Manager) and click import on the Core Samples.

Import Core Samples
IMPORTANT

The Camera Frame Access sample's implementation requires unsafe code to be enabled under Player Settings (> Android Tab) > Other Settings group > Script Compilation > Allow 'unsafe' Code. If you do not wish to allow unsafe code, do not need the Camera Frame Access sample, and want to get rid of the error in the OpenXR Project Validation, you may delete the Camera Frame Access Sample folder from Samples > Snapdragon Spaces > [SDK Version] > Core Samples > Scenes.

After the samples have been imported, there is a helper tool to add the sample scenes to the build settings by clicking Window > Snapdragon Spaces > Add Scenes to Build Settings in the menu bar.

Add scenes to the Editor build settings