Can't retrieve Azure Spatial Anchor (unity3D, Hololens 2)

Olivier Martineau 1 Reputation point

About one year ago, I developed an application for Hololens 2 using Azure Spatial Anchors. This application can create, retrieve and delete anchors. It worked well. Today, I tried to use the application again. The anchor creation works but I can not retrieve my anchor.

I use AzureSpatialAnchor SDK 2.1.1. Here is the code for retrieving my anchors :

AnchorLocateCriteria criteria = new AnchorLocateCriteria();
criteria.Identifiers = anchorsToFind.ToArray();
azureWatcher = azureSession.CreateWatcher(criteria);

Of course, I defined a method for callback when anchor has been retrieved :

azureSession = new CloudSpatialAnchorSession();
azureSession.AnchorLocated += OnAzureAnchorLocated;

    public void OnAzureAnchorLocated(object sender, AnchorLocatedEventArgs args) {
        AddToActionQueue(() => {
            switch (args.Status) {
                case LocateAnchorStatus.Located:
                case LocateAnchorStatus.AlreadyTracked:
                case LocateAnchorStatus.NotLocatedAnchorDoesNotExist:
                    // The anchor was deleted or never existed in the first place
                    // Drop it, or show UI to ask user to anchor the content anew
                    DebugConsole.LogMessage("Anchor does not exist");
                case LocateAnchorStatus.NotLocated:
                    // The anchor hasn't been found given the location data
                    // The user might in the wrong location, or maybe more data will help
                    // Show UI to tell user to keep looking around
                    DebugConsole.LogMessage("Anchor not located");

I have no error and no message (located, alreadyTracked, doesNotExists, NotLocated)

Taking a look in the spatial anchor supervision in Azure portal, I can see one creation request but.. no queries request !

Does someone know how I could solve my problem ?


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.
88 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.
387 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,106 Reputation points

    Hello @Olivier Martineau I hope the below info helps with your initial query.

    The minimum supported version is ASA SDK 2.7.0. Please make sure to update to the latest SDK (ASA SDK 2.10.2).

    Please have a look at the : ASA SDK 2.7.0 is the Minimum Version

    Please comment in the below section for further help in this matter. If the response is helpful, please click "Accept Answer" and upvote it.