Azure Spatial Anchors Sample


Supported Unity versions Built with XR configuration
Unity 2020 or higher Mixed Reality OpenXR Plugin 0.9.2

Azure Spatial Anchors is a cross-platform developer service that allows you to create mixed reality experiences with objects that persist their locations across devices over time. This sample project shows how to use Azure Spatial Anchors on the HoloLens 2 using Unity and OpenXR.

Photo of Azure Spatial Anchors Sample Scene


File/folder Description
Assets Unity assets, scenes, prefabs, and scripts.
Packages Project manifest and packages list.
ProjectSettings Unity asset setting files.
UserSettings Generated user settings from Unity.
.gitignore Define what to ignore at commit time. This README file.

Running the app

  1. If you don't have an Azure subscription, create a free account before you begin.
  2. Use your Azure subscription to create a spatial anchors resource.
  3. Configure the account information to be used in this project, writing the Account Key, Account ID, and Account Domain into Assets\AzureSpatialAnchors.SDK\Resources\SpatialAnchorConfig.asset.
  4. Build and run the project.