Skip to main content
Version: 1.0

Unity Setup Guide

This guide will explain in detail how to get started with the Snapdragon Spaces SDK in Unity.

Prerequisites

VERSION

Please note that the recommended Unity Editor version to work with Snapdragon Spaces is 2022.3 LTS (starting with 2022.3.16f1). Later versions of the Unity Editor have not been extensively tested and may not work as effectively.

Android Build Support must be added when installing the Unity Editor to be able to export .apk files. The module can also be added afterwards through the Unity Hub.

Download the Developer Package

Download the developer package from the Snapdragon Spaces Developer Portal.

Import the Package

The Snapdragon Spaces SDK comes as a package in form of a tarball file. Please follow the Unity instructions to import the package into the project using the tgz file located in the Unity Package folder.

tip

To have the package listed with a relative path (better for version control) instead of an absolute path, copy the tgz file into your project's Packages directory and then add it from there.

XR Interaction Toolkit Import

The Snapdragon Spaces Unity package has a dependency to the XR Interaction Toolkit package. During the import of the Snapdragon Spaces package, two prompts may pop up while importing XR Interaction Toolkit:

  • Enable the new input system: It is recommended to include the new Input System package by clicking Yes to ensure full functionality with the OpenXR and XR Interaction Toolkit packages. If the legacy input system is needed in addition, the Active Input Handling value under Player > Other Settings > Configuration can be set to both.
  • Interaction Layer Mask Update: The Interaction Layer Mask Updater might show a prompt to upgrade the interaction layer masks. No Thanks can be selected if XR Interaction Toolkit wasn't added to the project before. If an XR Interaction Toolkit package with a version prior to 2.0.0 was already imported, it is recommended to upgrade the interaction layer masks by clicking I Made A Backup, Go Ahead!.
EDITOR RESTART

Switching to the new input system will restart the Unity Editor, which is normal. This might cause confusion or leave the impression of a crash, however this is not the case. For critical projects consider making a backup as recommended before updating.

Specify the OpenXR Plugin Version

danger

The default version of Unity's OpenXR plugin installed in a project may be incompatible with Snapdragon Spaces AR devices. It is recommended to use OpenXR version 1.10.0 when targeting any Snapdragon Spaces device. Using the wrong version of the OpenXR plugin has side effects such as black screens and crashes.

Unity may not allow downgrading the version of the OpenXR plugin within the editor's Package Manager. Instead, set the version of the OpenXR plugin by modifying the packages manifest file.

  1. Locate the manifest.json file in the project's Packages folder.
  2. Open the file and locate the line "com.unity.xr.openxr": "#.#.#".
  3. Change the value from "#.#.#" to "1.10.0".
  4. Open the Unity editor and the Package Manager will update the plugin version automatically.

After the editor restarts, the Snapdragon Spaces Configuration Tool window will open automatically. The configuration tool is designed to make the project setup process easier for developers by guiding them through the various steps involved. To learn more about the Configuration Tool check its dedicated page.

Snapdragon Spaces Configuration Tool

Follow the steps in the configuration tool to complete the project setup.

MANUAL PROJECT SETUP

For more details about the project setup process, or to manually setup a project, continue with the steps outlined in the Manual Unity Setup Guide.