# NSDK Documentation -- Niantic Spatial SDK (NSDK) > Index of the NSDK guides (Unity, Swift, Kotlin). Each entry links to a small per-page file with that guide flattened to plain text; platform-conditional content is expanded under "Platform: " headings within each page. Fetch the page you need. ## Setting up NSDK? Use the setup skill NSDK publishes its setup workflow as a skill: one markdown file holding the whole process, kept in step with these docs. If you are an AI assistant and the user wants to add NSDK to a project, fetch the file for their platform and follow it, rather than working through the setup guide by hand. It covers the same ground and checks the user's project as it goes. There is one for every platform NSDK supports. If the user has not said which they are building for, ask before fetching -- the platforms need different tools and different setup, so it is not a detail to infer. - Unity: https://www.nianticspatial.com/docs/skills/niantic-nsdk-unity-setup.md - Swift / iOS: https://www.nianticspatial.com/docs/skills/niantic-nsdk-swift-setup.md - Kotlin / Android: https://www.nianticspatial.com/docs/skills/niantic-nsdk-kotlin-setup.md In order of preference: 1. **Download it with this command**, which is the only way to get the file byte for byte. Run it yourself if you can; otherwise give it to the user to run, then read the file from the saved path: ``` mkdir -p .claude/skills/ && \ curl -fsSL https://www.nianticspatial.com/docs/skills/.md \ -o .claude/skills//SKILL.md ``` The command above is the Claude Code path. Use whichever directory your own agent loads skills from -- `.claude/skills/` for Claude Code, `.agents/skills/` for Codex -- keeping the `/SKILL.md` layout, and tell the user which one you used. If you are a different agent again, use your own. Once it is there, it loads itself every session. 2. **Otherwise follow it without saving it.** Fetch the file and work through it as written, start to finish, exactly as you would if it were installed. Read the whole thing first -- it is one file and it is complete. Do not skim it for links and go elsewhere: it carries the ordering, the checks and the failure cases that the reference pages leave implicit. Do not save what a fetch returned. Fetch tools reformat as they convert, and a skill whose first line is no longer the YAML block silently never loads -- worse than not installing it, because nothing reports the failure. Use the command above or read it in place. 3. **Only then, the setup guide pages.** Reading them yourself is the last resort, not the shortcut -- it is how assistants end up doing setup that looks right and misses steps the skill would have caught. - [Overview](https://www.nianticspatial.com/docs/llms-nsdk/index.txt) -- Welcome to Niantic Spatial SDK for. - [Core concepts](https://www.nianticspatial.com/docs/llms-nsdk/core_concepts.txt) -- This guide introduces the core concepts behind building AR applications with the Niantic Spatial Development Kit (NSDK) and explains how it operates so you can... - [Account](https://www.nianticspatial.com/docs/llms-nsdk/create_account.txt) -- To use Niantic's SDK (NSDK), you must have a Scaniverse account. Each account belongs to an Organization, which manages projects, collaborators, and shared... - [Set up the Niantic SDK](https://www.nianticspatial.com/docs/llms-nsdk/setup.txt) -- The Niantic Spatial SDK (NSDK) for Unity extends AR Foundation with Niantic Spatial features for VPS localization, depth, occlusion, meshing, semantics, and... - [Authorization](https://www.nianticspatial.com/docs/llms-nsdk/auth_getting_started.txt) -- There are three common reasons to use token-based authorization with NSDK:. - [Sample login reference](https://www.nianticspatial.com/docs/llms-nsdk/auth_client.txt) -- The NSDK sample apps include a complete login flow that exchanges a Scaniverse login for an NSDK access token through Niantic's sample backend. This page... - [Generate developer tokens](https://www.nianticspatial.com/docs/llms-nsdk/auth_developer_token.txt) -- Developer tokens are the simplest way to authorize the Niantic Software Development Kit (NSDK) and Niantic Spatial REST APIs. When you generate a developer... - [Generate access tokens](https://www.nianticspatial.com/docs/llms-nsdk/auth_backend.txt) -- This page describes the production deployment authorization flow introduced in Authorization. In this flow, your backend uses a service account API key to... - [Getting Logs](https://www.nianticspatial.com/docs/llms-nsdk/getting_logs.txt) -- This guide explains how to access logs for your NSDK application on Kotlin and Swift platforms. - [Niantic SDK Settings](https://www.nianticspatial.com/docs/llms-nsdk/xr_settings.txt) -- You will need a Unity project with NSDK enabled. For more information, see Set up the Niantic SDK for Unity. - [Developing for NSDK on XR Headsets](https://www.nianticspatial.com/docs/llms-nsdk/how-to/unity/headset_development.txt) -- Working with NSDK on XR headsets is, in many ways, the same as developing an AR experience for mobile devices. Due to hardware differences between XR headsets... - [Project Validation](https://www.nianticspatial.com/docs/llms-nsdk/features/project_validation.txt) -- Niantic Spatial SDK enables the Unity Project Validation system to identify issues with NSDK, including configuration problems in Projects and Scenes. These... - [First localization with NSDK](https://www.nianticspatial.com/docs/llms-nsdk/first_localization.txt) -- Localization determines a device's position and orientation in the real world. VPS2 localization provides precise alignment when the device is within a scanned... - [Localization](https://www.nianticspatial.com/docs/llms-nsdk/features/localization.txt) -- Anchor your experiences to the real world. - [Niantic Spatial Visual Positioning System 2](https://www.nianticspatial.com/docs/llms-nsdk/features/vps2.txt) -- Niantic Spatial's Visual Positioning System 2 (VPS2), helps an app estimate where the device is in the world and place content at a stable position inside a... - [Get started with VPS2](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps2/adding_vps2.txt) -- This guide shows how to add VPS2 to your project, configure its localization options, and manage its lifecycle. For an explanation of universal and VPS map... - [Geolocate with VPS2](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps2/getting_vps2_geoposition.txt) -- Use VPS2 device geolocation to read the device's current geographic position and heading. For map-relative AR placement, localize to a Site or nearby... - [Place virtual content with VPS2](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps2/placing_virtual_content.txt) -- This guide explains how to place virtual content in an AR scene relative to a localized asset or at known geo coordinates. - [Guide users during localization](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps2/guide_users_during_localization.txt) -- Coach users toward a successful localization by reacting to VPS2's localization request records. - [Diagnose VPS2 localization with VPS Debugger](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps2/analyze_tracking_issues.txt) -- VPS2 tracking states tell you the outcome of localization, such as whether a device has a coarse or precise position and whether an asset is tracked. They do... - [Migrate from VPS to VPS2](https://www.nianticspatial.com/docs/llms-nsdk/features/vps2_migration.txt) -- This guide is for developers migrating from Unity ARDK 3.x to NSDK 4.x. - [Sites](https://www.nianticspatial.com/docs/llms-nsdk/features/sites.txt) -- The Sites feature provides access to organized entity data in the Niantic Spatial platform, enabling your application to discover and navigate the... - [Getting Started with Sites](https://www.nianticspatial.com/docs/llms-nsdk/how-to/sites/getting_started.txt) -- The Sites feature provides an API for querying hierarchical data in the Niantic Spatial platform. This guide will help you get started using Sites in your... - [How to Download a Mesh Using the API](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/mesh_download.txt) -- With the Mesh Download API, you can download and create a mesh of any Site at runtime, allowing you to dynamically create mesh overlays in AR scenes. This... - [AR Effects](https://www.nianticspatial.com/docs/llms-nsdk/features/ar_effects.txt) -- Tools for grounding your virtual content in the real world. - [Niantic Spatial Depth](https://www.nianticspatial.com/docs/llms-nsdk/features/depth.txt) -- Depth refers to the distance between the camera and the objects in a scene -- essentially, how far away each pixel is from the viewer's perspective. In... - [Adding Depth to Your Project](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/depth/adding_depth.txt) -- When using Unity, the Niantic Spatial SDK (NSDK) integrates seamlessly with Unity's AR Foundation. This means your application can access depth data through... - [Displaying Depth](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/depth/display_depth.txt) -- This tutorial explains how to visualize the environment depth texture provided by NSDK using Unity's UI system. This can be useful for debugging or validating... - [Displaying Interpolated Depth](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/depth/interpolated_depth.txt) -- In the previous tutorial, we learned how to display the raw environment depth texture from NSDK using Unity's AROcclusionManager. That setup visualized the... - [Preloading the Model File](https://www.nianticspatial.com/docs/llms-nsdk/features/model_preloading.txt) -- NSDK's awareness features rely on neural network models to know how to draw each pixel in an AR environment. Because these models are not included with NSDK... - [Occlusion](https://www.nianticspatial.com/docs/llms-nsdk/features/occlusion.txt) -- Occlusion ensures virtual content appears correctly behind real-world objects. Without occlusion, AR objects may appear to float in front of surfaces they... - [Adding Occlusion to Your Project](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/adding_occlusion.txt) -- The Niantic Spatial Unity SDK (NSDK) extends the AR Foundation XROcclusion and XRMeshing subsystems with Niantic Spatial's improved algorithms, seamlessly... - [Meshing](https://www.nianticspatial.com/docs/llms-nsdk/features/meshing.txt) -- The nature of augmented reality requires physical space to be perceived and understood so that graphics and contextual information are correct from the user's... - [Adding Meshing to Your Project](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/meshing/adding_meshing.txt) -- By placing the standard ARMeshManager in a scene, developers can access a live mesh that allows virtual objects to interact with the real-world environment... - [Level of Detail Meshing](https://www.nianticspatial.com/docs/llms-nsdk/experimental/level_of_detail_meshing.txt) -- Niantic Spatial Meshing reconstructs the visible geometry of the scene, allowing AR characters and objects to interact physically with their environment. By... - [Preloading the Model File](https://www.nianticspatial.com/docs/llms-nsdk/features/model_preloading_meshing.txt) -- NSDK's awareness features rely on neural network models to know how to draw each pixel in an AR environment. Because these models are not included with NSDK... - [Niantic Spatial Scene Segmentation](https://www.nianticspatial.com/docs/llms-nsdk/features/semantics.txt) -- Scene Segmentation is the process of classifying every pixel in an image into meaningful categories, creating a detailed understanding of the environment. This... - [Adding Scene Segmentation](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/adding_semantics.txt) -- NSDK provides this unique feature through the new XRSemanticsSubsystem class. The ARSemanticSegmentationManager makes this subsystem's data available as a... - [Preloading the Model File](https://www.nianticspatial.com/docs/llms-nsdk/features/model_preloading_semantics.txt) -- NSDK's awareness features rely on neural network models to know how to draw each pixel in an AR environment. Because these models are not included with NSDK... - [How to Convert a Screen Point to Real-World Position Using Depth](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/depth/convert_point_world_position.txt) -- Niantic Spatial SDK's depth map output allows for dynamically placing objects in an AR scene without the use of planes or a mesh. This guide covers the process... - [How to Set Up Real-World Occlusion](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/setup_real_world_occlusion.txt) -- On iOS, Niantic Spatial depth can be used to occlude virtual content in several ways, depending on how much control you need over rendering and synchronization. - [How to Exclude Semantic Channels with Mesh Filtering](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/meshing/semantic_mesh_filtering.txt) -- Semantic Mesh Filtering allows you to set an allow list or block list of semantic channels. These follow standard allow/block list behavior. Using an allow... - [How to Add Physics to a Meshed Scene](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/meshing/meshing_physics_real_world.txt) -- This how-to covers: Adding dynamic meshing to a scene with the default manager; How to create a prefab for meshing; Interacting with mesh physics; Making the... - [How to Query Scene Segmentation and Highlight Semantic Channels](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/query_semantics_real_objects.txt) -- This how-to covers: Querying scene segmentation to detect what is on-screen at a point the player touches; Highlighting a specific semantic channel based on... - [How to Use Neural Network Model Preloading](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/use_model_preloading.txt) -- Meshing, depth & occlusion, and scene segmentation use neural network models to process the camera frames. To improve runtime performance, Model Preloading... - [How to enable scan visualization](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/scan_visualization.txt) -- Scan visualization gives users real-time feedback while they scan. Areas that have been sufficiently captured appear in full color, while incomplete areas... - [Experimental](https://www.nianticspatial.com/docs/llms-nsdk/experimental/index.txt) -- Experimental features are not recommended for use in production-level applications! :::. - [Windows Development](https://www.nianticspatial.com/docs/llms-nsdk/experimental/windows.txt) -- Windows development is available in NSDK 4 as an experimental feature. - [Device Mapping](https://www.nianticspatial.com/docs/llms-nsdk/features/device_mapping.txt) -- Device Mapping is a system that scans and tracks real-world objects, allowing you to place content in alignment with the real world. On the surface, it is... - [How to Create a Device Map](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/adding_device_mapping.txt) -- Before you can use a device map in your AR application, you will need to create and save it. In this tutorial, we will go over how to create and save a device... - [Using Device Maps](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/using_device_maps.txt) -- Now that we have created a device map and saved it to a file, we can read it to place virtual objects in the AR scene. In this how-to, we will cover reading a... - [Sample Projects](https://www.nianticspatial.com/docs/llms-nsdk/sample_projects.txt) -- These samples are designed to demonstrate the uses of each feature in our SDK. The sample project launches multiple small samples that you can try out and look... - [Developer Tools](https://www.nianticspatial.com/docs/llms-nsdk/features/developer_tools.txt) -- Streamline the development of your product. Our developer tools enable you to test your project from the comfort of your desk and eliminates the need to visit... - [How to Set Up and Run NSDK Simulation](https://www.nianticspatial.com/docs/llms-nsdk/how-to/unity/simulation_mocking.txt) -- NSDK Simulation allows you to test your AR content in-editor without having to use Unity's playback mode. Our simulation mode allows you to move freely around... - [Recording and Playback](https://www.nianticspatial.com/docs/llms-nsdk/features/playback.txt) -- The Playback feature allows you to import pre-recorded AR sessions and re-run them during a new AR runtime session. Using Playback supplies the application... - [How to set up playback](https://www.nianticspatial.com/docs/llms-nsdk/how-to/playback/setting_up_playback.txt) -- This guide explains how to set up Playback so you can iterate in the Unity Editor instead of building to a device. Playback runs NSDK algorithms in the editor... - [Create playback datasets](https://www.nianticspatial.com/docs/llms-nsdk/how-to/playback/create_playback_dataset.txt) -- Use NSDK Recording to capture camera, motion, and sensor data from an AR session. Export the recording as a playback dataset for repeatable testing in the... - [Migration guide](https://www.nianticspatial.com/docs/llms-nsdk/migration_guide.txt) -- Upgrade from legacy Lightship.dev and ARDK SDK to Scaniverse and NSDK 4.0. Developers must migrate Lightship.dev content to Scaniverse. Developers maintaining... - [Glossary](https://www.nianticspatial.com/docs/llms-nsdk/glossary.txt) -- AR Scene - A Unity Scene that has an ARSession and XROrigin setup to enable AR. See Set up a basic AR scene. - [Download SDK](https://www.nianticspatial.com/docs/llms-nsdk/downloads.txt) -- The Niantic Spatial SDK (NSDK) is built to work with iOS, Android, and Unity. For the best experience, please ensure your development environment meets the... - [Release Notes](https://www.nianticspatial.com/docs/llms-nsdk/release_notes.txt) -- Stop localizing and convert AR poses to geolocations VPS2 site localization and asset tracking in Unity Starting VPS2 is optional Site assets expose their... - [NSDK Data Privacy](https://www.nianticspatial.com/docs/llms-nsdk/data_privacy.txt) -- Niantic Spatial requires applications built on its platform to prioritize user safety, privacy, and responsible real-world interactions. Developers must avoid... - [Contact Us](https://www.nianticspatial.com/docs/llms-nsdk/contact_us.txt) -- You can contact the Niantic Spatial Platform team in our Community Forums if you have any questions. - [ARDK Features](https://www.nianticspatial.com/docs/llms-nsdk/features/index.txt) -- ARDK supplies these features in addition to what ARFoundation supports. Consult each topic to learn more:. - [Visual Positioning System (VPS)](https://www.nianticspatial.com/docs/llms-nsdk/features/lightship_vps.txt) -- With Niantic Spatial's Visual Positioning System (VPS) you now have the power to determine a user's position and orientation with centimeter-level accuracy -... - [Preloading the Model File](https://www.nianticspatial.com/docs/llms-nsdk/features/model_preloading_obj_detection.txt) -- NSDK's awareness features rely on neural network models to know how to draw each pixel in an AR environment. Because these models are not included with NSDK... - [Simulation](https://www.nianticspatial.com/docs/llms-nsdk/features/simulation.txt) -- NSDK Simulation extends the base Unity simulation package to support testing NSDK features in XR simulation. This feature allows you to test your application... - [World Pose System (WPS)](https://www.nianticspatial.com/docs/llms-nsdk/features/world_pose.txt) -- The World Pose System (WPS) provides the 3D position and orientation of the phone in geographic coordinates as an alternative to using device GPS and compass... - [How to Create a Gaussian Splat](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/gaussian_splat.txt) -- The Niantic Spatial Platform SDK offers a Gaussian splat feature that can produce a Gaussian cloud from a recorded sequence. - [How to Serialize Content Placed at Runtime for Persistence](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/serialize_runtime_scenes.txt) -- This how-to demonstrates: Registering prefabs for spawning at runtime Storing transform and stateful data for restoring content in a future session * Updating... - [How to Create a Textured Mesh](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/textured_mesh.txt) -- The Niantic Spatial SDK offers a textured meshing feature that can produce a mesh and texture from a recorded sequence. While live meshing is useful for... - [How to Set Up ARDK with the Universal Render Pipeline](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/urp.txt) -- - Completion of Set up the Niantic SDK for Unity - Completion of Configure URP for AR Foundation. - [How to Build an App Using the World Pose System (WPS)](https://www.nianticspatial.com/docs/llms-nsdk/how-to/ar/world_pose.txt) -- NSDK offers a World Pose System (WPS) that you can use to get locations and compass heading orientations with better accuracy and stability than standard GPS... - [Getting Started with VPS](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/adding_vps.txt) -- When using Unity, the Niantic Spatial Development Kit (NSDK)s package provides a configurable component to help you create and manage your VPS enabled AR... - [Creating Device Maps](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/creating_device_maps.txt) -- Before you can use a device map in your AR application, you will need to create and save it. In this tutorial, we will go over how to create and save a device... - [How to Use Location AR with Code](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/location_ar_code.txt) -- Use VPS2 Site and asset localization for Location AR. Select a Site at runtime, call the platform's localize API with its Site ID, and place content relative... - [Location Drift Mitigation](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/location_manager.txt) -- The ARLocationManager class provides experimental features for drift mitigation. - [Place Content in Real-World Locations Using Location AR](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/real_world_location_ar.txt) -- The AR Location is the highest-level abstraction that allows us to "anchor" virtual objects to the real world. - [How to Activate an Existing VPS Location](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/tooling/activate_existing_location.txt) -- Using the Geospatial Browser, you can view and interact with locations on the Niantic Map and activate existing locations in your area. If you want to activate... - [How to Create a Public Location](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/tooling/create_vps_activated_location.txt) -- We are continually growing our global coverage of Public locations, but you may have a specific location in mind that is not yet in our database. If the... - [Scaniverse for Lightship](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/tooling/lightship_scaniverse.txt) -- We are currently running a beta of Scaniverse for Niantic Developers, which seamlessly integrates the Geospatial Browser (GSB) with the award-winning scanning... - [How to Manage Site Scans and Meshes](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/tooling/manage_test_scans.txt) -- Use the Scaniverse app to capture and upload scans for a Site. Use Scaniverse Web to manage the Site and its generated assets. - [How to Use the Geospatial Browser](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/tooling/use_geospatial_browser.txt) -- The Geospatial Browser allows you to search and find VPS-Activated locations across the globe. You can select the locations you want to use for your project... - [Localizing and Tracking Anchors with VPS](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/tracking_anchors_swift.txt) -- Anchors are persistent spatial reference points that can be tracked across sessions and devices. The Vps2Session is responsible for managing these anchors and... - [VPS Best Practices](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps/vps_best_practices.txt) -- Localization is a powerful tool that allows AR to sync up with the real world in real time and create truly magical experiences. Unfortunately, it is also a... - [how-to/vps2/vps2_config_partial](https://www.nianticspatial.com/docs/llms-nsdk/how-to/vps2/vps2_config_partial.txt) -- | Field | Default | What it controls | |---|---:|---| | Universal Localization Enabled | Disabled | When active, the VPS2 session sends camera imagery and the... - [Portal](https://www.nianticspatial.com/docs/llms-nsdk/portal.txt) - [sample_projects_partials/import_samples](https://www.nianticspatial.com/docs/llms-nsdk/sample_projects_partials/import_samples.txt) -- The samples are available on our GitHub: https://github.com/nianticspatial/nsdk-samples-csharp -- after cloning, open the NsdkSamples folder in Unity Hub (Unity... - [Supported Devices](https://www.nianticspatial.com/docs/llms-nsdk/supported_devices.txt) -- NSDK is able to run on all devices that support ARCore and ARKit. Please refer to their respective help pages for more details. Some ARDK features, such as...