Skip to main content

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

Niantic Spatial provides a Unity Setup Skill containing the NSDK setup workflow. AI assistants can use the Skill to guide or automate NSDK installation and configuration, helping you complete the steps on this page more quickly.

To use an AI coding assistant to set up the Niantic SDK for you, do the following:

  1. Download the Unity setup Skill.
  2. Extract and place the folder into your AI assistant's skills directory. For example:
    • Claude Code: .claude/skills/
    • Codex: .agents/skills/
  3. Create or open an existing Unity project. If you're creating a new project, use the 3D (Built-In Render Pipeline) or Universal 3D (Core) template.
  4. 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.
  2. Download and install the Unity Hub and the Unity Engine.
  3. Install the Niantic SDK Unity packages.
  4. Authenticate Niantic SDK in Unity.
  5. Activate the XR Loader for your mobile platform.
  6. Configure the build platform in Unity for your target device.
  7. 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. 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.

Download and install Unity

In order to install the Unity 3D Engine you must first install the Unity Hub which gives you access to the latest versions of the currently supported engines.

NSDK only supports Unity LTS and Unity 6000.0.74f1. If you no longer see this engine version in the Unity Hub downloads window, go to the Unity download archive to locate it. Using any other version of 6000.0.x can introduce conflicts with NSDK and is not recommended.

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.

  1. Create a new Unity project with the 3D (Built-In Render Pipeline) template. Alternatively, if planning to use Unity's Universal Render Pipeline select the Universal 3D (Core) template.
Attention!

If you are using or plan to use the Universal Render Pipeline (URP), refer to How to Set Up NRDK with the Universal Render Pipeline for additional setup instructions.

  1. In your Unity project, open the Window top menu, then select Package Manager.
Attention!

If you are using Unity 6000.0.X, you must update the AR Foundation package to a minimum of 6.3.0, but we recommend 6.4.1.

  1. From the plus menu on the Package Manager tab, select Add package from git URL....

    Package Manager menu

  2. 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.

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. Download and unzip the Source code (zip) from the Unity package release repository.
  2. In Unity, open Window > Package Management > Package Manager.
  3. Open the drop-down menu next to the + in the top-left main window.
  4. Select Install Package From Disk in Unity Package Manager
  5. Select the root package.json file.

Do not use GitHub source archives from Download ZIP / tar.gz or Add package from tarball for this workflow.

Authenticate Niantic SDK in Unity

Authenticate NSDK in Unity before you build and run your project. The following setup flow uses Unity Editor sign-in. If you prefer to use a developer token for development and internal testing, see Generate developer tokens.

  1. Navigate to Unity's top menu bar and select the NSDK tab.
  2. Select Settings to open the NSDK Settings menu.
  3. Log into your Scaniverse account.

For more details, see Authorization.

A successful build does not mean authentication is configured

Importing NSDK adds an AuthBuildSettings asset that can be empty, so a project will still compile and build with no auth configured — that is not proof runtime auth works. Confirm authentication is actually set up (sign in via NSDK > Settings, or provide an access token override) before relying on a green build.

Activate the XR loader

Attention!

In Unity versions 6000.0.74f1 or newer, you might see a benign error in the console after following these steps.

  1. Open the NSDK top menu, then select XR Plug-in Management.
  2. In the XR Plug-in Management menu, select the Android tab, then check the box labeled Niantic Spatial Development Kit + Google ARCore.

Configure the build platform

  1. Open the Build Profiles window by selecting File > Build Profiles.
  2. Select iOS or Android, then click Switch Platform. After the progress bar finishes, click Player Settings. Select your platform from the tabs, scroll down to Other Settings, and change the following settings:
  • Rendering - Uncheck Auto Graphics API. If Vulkan appears in the Graphics API list, 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.

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

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 Sample Projects to explore working examples of NSDK features.