[Unity, Hololens2] Spatial Anchor ID could not be imported from the Azure Spatial Anchors network.

Min-Jae, Lee 36 Reputation points
2022-05-16T09:37:15.09+00:00

Process.

  1. [Hololens Player1] Move Model
  2. [Hololens Player1] Click "Start Azure Session" Button
  3. [Hololens Player1] Click "Create Azure Anchor" Button
  4. [Hololens Player1] Click "Share Anchor ID to Network" Button
    It runs well up to this Step.
    205654-202219-shared-anchor.jpg

But it doesn't work to bring up anchor id.

  1. [Hololens Player2] Click "Get Anchor ID from Network" Button
    At this stage, the anchor id part is empty.

205635-202220-get-anchor.jpg

Azure Spatial Anchors
Azure Spatial Anchors
An Azure service that is used to build immersive three-dimensional applications and experiences that map, persist, and restore content or points of interest at real-world scale.
86 questions
HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
380 questions
{count} votes

Accepted answer
  1. clcheles 271 Reputation points
    2022-05-20T11:28:40.363+00:00

    I believe that "Persist Azure Spatial Anchors between app sessions" title is not describing the scenario correctly. It should say "Persist Spatial Anchors between app sessions".
    "Saving to disk" and "Saving to Network" implementations are not ready-to-use scripts in a production application. You should update them per your need.
    CreateAnchor script contains 2 parts: 1 for creating a local anchor and 1 from uploading that anchor to Azure Spatial Anchors service.

    SaveAzureAnchorIdToDisk script just grabs currentAzureAnchorID, which might be available or not, and saves it to a txt file. There isn't any check implemented, so even if it fails, you'll still see "Current azure anchor id.." text displayed. Same goes for "ShareAzureAnchorIdToNetwork"

    ShareAzureAnchorIdToNetwork relies on an webserver that you need to build yourself to save and retrieve anchors, in case you don't want to use Azure Spatial Anchors service.
    For the best results, I encourage you to use Azure Spatial Anchors for persistence and sharing.
    You can read more about Azure Spatial Anchors here and use this tutorial and official Azure Spatial Anchors sample


0 additional answers

Sort by: Most helpful