# Set up the Niantic SDK Source: https://www.nianticspatial.com/docs/nsdk/setup/?platform=unity # Set up the Niantic SDK for Unity The Niantic Spatial SDK (NSDK) for Unity extends AR Foundation with Niantic Spatial features for VPS localization, depth, occlusion, meshing, semantics, and developer tools such as playback and project validation, so you can build Unity AR experiences with real-world localization, contextual awareness, and NSDK development workflows. ### Prerequisites Before you begin, decide whether you are building for Android, iOS, or Meta Quest 3. If you are building for iOS, you will also need Apple Developer account setup for signing. ## AI set up > **Tip:** > > NSDK supports AI-assisted development > > NSDK publishes **Skills**: packaged setup workflows that an AI coding assistant reads > directly. This is a supported way to work with NSDK, and usually the fastest and > smoothest path to a working integration -- the assistant carries out the steps on this > page with you, checking your project as it goes. > > **Download the Unity setup Skill** To use an **AI coding assistant** to set up the Niantic SDK for you, do the following: 1. Extract and place the folder into your AI assistant's skills directory. For example: - Claude Code: `.claude/skills/` - Codex: `.agents/skills/` 2. Create or open an existing Unity project. If you're creating a new project, use the **Universal 3D** template. 3. Ask your AI assistant to set up NSDK in your project. It will guide you through the required steps and help configure your project. ## Manual set up To **manually** set up the Niantic SDK for Unity, you will need to: 1. [Create an account](#create-an-account). 2. [Download and install](#download-and-install-unity) the Unity Hub and the Unity Engine. 3. [Install the Niantic SDK Unity packages](#install-the-niantic-sdk-packages). 4. [Authenticate Niantic SDK in Unity](#authenticate-niantic-sdk-in-unity). 5. [Activate the XR Loader](#activate-the-xr-loader) for your mobile platform. 6. [Configure the build platform](#configure-the-build-platform) in Unity for your target device. 7. [Set up a basic AR scene](#set-up-a-basic-ar-scene) to test your configuration. Steps to manually set up the NSDK are shown in the following sections. --- ### Create an account Before getting started with the NSDK setup, follow the steps to [create a Scaniverse account](https://www.nianticspatial.com/docs/nsdk/create_account/#create-a-scaniverse-account). You will use this account either to sign in through **NSDK > Settings** in the Unity Editor or to create a developer token, depending on the authorization path you choose. For authorization options, see [Authorization](https://www.nianticspatial.com/docs/nsdk/auth_getting_started/). ### Download and install Unity In order to install the Unity 3D Engine you must first install the [Unity Hub](https://unity.com/download) which gives you access to the latest versions of the currently supported engines. NSDK supports a single Unity LTS version: **Unity 6 LTS 6000.3.14f1**. If you no longer see this engine version in the Unity Hub downloads window, go to the [Unity download archive](https://unity.com/releases/editor/archive) to locate it. Using any other Unity version can introduce conflicts with NSDK and is not supported. ### Install the Niantic SDK Packages Use the following platform-specific instructions to create your Unity project and add the NSDK packages through Unity Package Manager. Select the tab for your target platform before you begin. #### Android and iOS 1. Create a new Unity project with the **Universal 3D** template. The Universal 3D template uses the Universal Render Pipeline (URP). Complete the additional steps in [Set up NSDK with the Universal Render Pipeline](https://www.nianticspatial.com/docs/how-to/ar/urp/). 2. In your Unity project, open the **Window** top menu, then select **Package Manager**. 3. Add the Niantic SDK package. 1. Select the drop-down menu next to the **+** in the top-left window, then select **Add package from git URL...**. (image: Package Manager menu) 2. Enter `https://github.com/nianticspatial/nsdk-library-upm.git`. If Unity prompts you to activate the new Input System Package, choose the option required by your project. Select **No** if your project intentionally uses **Input Manager (Old)**. Activating the package may restart the Unity Editor. To install a specific NSDK version, use **Add package from git URL...** and append the Git tag, branch, or commit after a `#`. For example: `https://github.com/nianticspatial/nsdk-library-upm.git#vX.Y.Z`. The official installation path is **Add package from git URL...**. If you want to install NSDK locally instead: 1. From the Unity package [releases](https://github.com/nianticspatial/nsdk-library-upm/releases), download and extract a release package whose root contains `package.json`. 2. In Unity, open **Window > Package Manager**. 3. Open the drop-down menu next to the **+** in the top-left main window. 4. Select **Install package from disk...**. 5. Select the root `package.json` file. Do not use **Code > Download ZIP**, GitHub-generated source archives, or **Add package from tarball...** for this workflow. #### Meta Quest 3 The Niantic SDK leverages **Meta XR Core SDK** and **Unity's XR Core Plugin** to support the **Meta Quest 3**. Follow Meta's [official tutorial](https://developers.meta.com/horizon/documentation/unity/unity-project-setup/) to begin developing for the Meta Quest 3 in Unity 6. #### Notes & Caveats - Ensure you're using the supported Unity 6 LTS version (**6000.3.14f1**) and the **OpenXR** plugin (`com.unity.xr.openxr`) version **1.15.1**. Version 1.16.1 is known to cause issues, so force the package to **1.15.1** in the Package Manager. - The **Meta XR Core SDK** must be acquired from the [Unity Asset Store](https://assetstore.unity.com/packages/tools/integration/meta-xr-core-sdk-269169), as explained in the Meta docs. Select **Enable Feature Set** if prompted. - If prompted to restart the Unity Editor, do so with **Restart Editor**. - Verify the Quest's OS version is >=v74 1. Go to Meta -> Tools -> Project Setup Tools and resolve all issues. 2. In your Unity project, open the **Window** top menu, then select **Package Manager**. 3. From the plus menu on the Package Manager tab, select **Add package from git URL...**. (image: Package Manager menu) 4. Enter `https://github.com/nianticspatial/nsdk-library-upm.git`. 1. If prompted, select **Yes** to activate the new Input System Package. This may require a restart of the Unity Editor. 5. Install the **NSDK Quest Package** by repeating these steps using the following URL instead: `https://github.com/nianticspatial/nsdk-library-upm-quest3.git`. To install a specific NSDK version, use **Add package from git URL...** and append the same Git tag, branch, or commit to both package URLs. For example: - `https://github.com/nianticspatial/nsdk-library-upm.git#vX.Y.Z` - `https://github.com/nianticspatial/nsdk-library-upm-quest3.git#vX.Y.Z` ### Authenticate Niantic SDK in Unity Authenticate NSDK in Unity before you build and run your project. You can do this in one of two ways: 1. Sign in through the Unity Editor: 1. In Unity's top menu bar, select **NSDK**. 2. Select **Settings**. 3. Sign in to your Scaniverse account. 2. Provide an access token directly to NSDK: For development and internal testing, create a developer token in [Scaniverse Web](https://scaniverse.nianticspatial.com/signin). For production apps, use an access token from your backend. Then choose **one** of the following ways to provide that token to NSDK: - In Project Settings, paste it into **Edit > Project Settings > XR Plug-in Management > Niantic Spatial Development Kit > Credentials > Niantic Spatial Access Token**. - In code, set `NsdkSettingsHelper.ActiveSettings.AccessToken`. For more information, see [Authorization](https://www.nianticspatial.com/docs/nsdk/auth_getting_started/), [Generate developer tokens](https://www.nianticspatial.com/docs/nsdk/auth_developer_token/), and [Generate access tokens](https://www.nianticspatial.com/docs/nsdk/auth_backend/). Before you continue, confirm that one of these authentication paths is set up. Importing NSDK adds an `AuthBuildSettings` asset, and that asset can be empty, so a successful build does not confirm that authentication is configured. ### Activate the XR loader > **Caution:** > > **Attention!** > > In Unity **6000.3.14f1**, you might see a [benign error](https://www.nianticspatial.com/docs/nsdk/release_notes/#known-issues) in the console after following these steps. #### Android Open the NSDK top menu, then select XR Plug-in Management. In the XR Plug-in Management menu, select the Android tab, then check the box labeled Niantic Spatial Development Kit + Google ARCore. #### iOS Open the NSDK top menu, then select XR Plug-in Management. In the XR Plug-in Management menu, select the iOS tab, then check the box labeled Niantic Spatial Development Kit + Apple ARKit. ### Configure the build platform 1. Open the **Build Profiles** window by selecting **File** > **Build Profiles**. 2. Select iOS or Android, then select **Switch Platform**. 3. After the progress bar finishes, select **Edit > Project Settings > Player**. 4. Select your platform from the tabs, scroll down to **Other Settings**, and change the following settings: #### Android Rendering - Uncheck Auto Graphics API. If Vulkan appears in the Graphics API list, select **-** to remove it. Identification - Set the Minimum API Level to Android 7.0 'Nougat' (API Level 24) or higher. Configuration - Set the Scripting Backend to IL2CPP, then enable both ARMv7 and ARM64. #### iOS Identification > Signing Team ID - Enter your iOS app developer key from developer.apple.com. Camera Use Description - Write a description for how you're using AR, such as "NSDK". Target Minimum iOS Version - Set to 14.0 or higher. Architecture - Select ARM64. In Unity, NSDK is configured through components and project settings. Once enabled, the SDK automatically receives AR frame and sensor data and updates each frame at runtime. ### Set up a basic AR scene #### Android To get started creating your own AR project, begin by creating an empty AR scene: 1. Create a new Basic scene: 1. From the main menu, choose **File** > **New Scene**. 2. Select **Basic (Built-in)** and click **Create**. 2. Right-click on the **Main Camera** and select **Delete**. 3. Add an **ARSession** and **XROrigin** to your new scene 1. Select the new scene in the **Hierarchy**. 2. From the main menu, select **Game Object** > **XR** > **AR Session**. 3. Repeat to add an **XR Origin (Mobile AR)**. 4. Save the scene using **File** > **Save**. > **Tip:** > > If you choose **Save As Scene Template**, you can select this scene in the **New Scene** dialog next time. #### iOS To get started creating your own AR project, begin by creating an empty AR scene: 1. Create a new Basic scene: 1. From the main menu, choose **File** > **New Scene**. 2. Select **Basic (Built-in)** and click **Create**. 2. Right-click on the **Main Camera** and select **Delete**. 3. Add an **ARSession** and **XROrigin** to your new scene 1. Select the new scene in the **Hierarchy**. 2. From the main menu, select **Game Object** > **XR** > **AR Session**. 3. Repeat to add an **XR Origin (Mobile AR)**. 4. Save the scene using **File** > **Save**. > **Tip:** > > If you choose **Save As Scene Template**, you can select this scene in the **New Scene** dialog next time. ## Next steps After your project is set up, continue to [Unity sample projects](https://www.nianticspatial.com/docs/nsdk/sample_projects/) to explore working examples of NSDK features.