[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

HoloLens | Development
HoloLens | Development
The process of creating immersive mixed reality applications for Microsoft HoloLens,
Community Center | Not monitored
{count} votes

Answer accepted by question author
  1. clcheles 272 Reputation points Moderator
    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

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.