Search Unity

Question Hololens 2 : XRAnchorStore & SpatialAnchorStore sync problem

Discussion in 'AR' started by guillaume_hf, Jan 21, 2022.

  1. guillaume_hf

    guillaume_hf

    Joined:
    Jun 1, 2021
    Posts:
    3
    Hello,

    I am working on an app for Hololens2 that uses AR anchors.

    This app fetches anchors from a server, and import them in the SpatialAnchorStore using the TrySave() function. (UWP code).

    Back in the OpenXR layer, i want to load my newly imported anchors from the XRAnchorStore i get from my ARAnchorManager with the XRAnchorStore.LoadAsync() function.

    But my new anchors are not listed, i have no other option than quitting/restarting my app to see the new anchors after importing them.

    What i tried :
    - Destroying / recreating the whole AR Session;
    - Reloading the store;
    - Creating/Destroying a dummy anchor to trigger the XRAnchorStore.m_persistedAnchorNamesCacheDirty flag and force updating cache.

    Is there any way to achieve this ?

    Guillaume