Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 138 forks source link

Unity HoloLens 2 Watcher Debug #376

Closed martinlzl closed 1 year ago

martinlzl commented 1 year ago

Hi all,

I'm developing a simple shared experience application on the HoloLens 2 that involves sharing of anchor with Azure Spatial Anchor service in Unity.

The general creation of anchor and receiving identifier to search logic is working as intended. However, the logic on creating or locating an anchor with insufficient environment data is what I'm having troubles with. For creation of anchor, I can understand and use the SpatialAnchorManager.IsReadyForCreate and SpatialAnchorManager.SessionStatus.RecommendedForCreateProgress to allow my application to show a simple feedback when there is insufficent data to create.

However for location anchors, after creating a Watcher with the AnchorLocateCriteria, if there is insufficient environment data, I can't seem to be find a way to know this. My last log will be "Azure Spatial Anchor Watcher created, locating anchor in physical space." and till I manually scan around or close the application and scan followed by restarting, then the process will work seamlessly.

I'm trying to cover all my bases which is bound to happen during deployment, that is having the HL2 device telling the user to scan around their environment more to proceed instead of having to rely on hoping the user knows how to react.

My current software versions are as follows:

martinlzl commented 1 year ago

Sorry all,

On further digging, I found a documentation that explains what I needed. Closing this issue.