Forum Discussion

alrsnxr's avatar
alrsnxr
Copper Contributor
Jan 19, 2022

CloudSpatialAnchor problem on ARFoundation

I'm creating a HoloLens app using Azure Spatial Anchors in Unity. All is good when creating, uploading and retrieving spatial anchors. But when trying to apply the spatial anchor to the scene object via the CloudNativeAnchor.CloudToNative method, I get this exception:

 

"InvalidOperationException: Could not find an ARAnchor associated with the CloudSpatialAnchor"

 

I tried calling gameObject.FindOrCreateNativeAnchor (which to my understanding creates an ARAnchor if there isn't one already) before calling CloudNativeAnchor.CloudToNative but the exception persists.

 

Any help is much appreciated!

 

I'm on these versions:
Unity 2020.3
ASA SDK 2.11.0
Mixed Reality OpenXR Plugin 1.2.1
ARFoundation 4.1.7 (edited)

Resources