Spatial Anchors bug: LoadUnboundAnchors returns null UUIDList
Hi,
I am struggling trying to work with Spatial Anchors and what looks like a bug. I am creating a few gameobjects in the virtual room, adding Space Anchors to them, saving the room anchors to local storage and reloading them. I save the uuid list so I can reload the objects even if I close the app and run it again. It works fine but, in some "random" situations, the LoadUnboundAnchors returns a null UUIDList as if it were no Unbound anchors to be loaded.
When this happens I can try and try to load them but always get the same result. But... if I create a new anchor in the session and save it, then I can reload all of them.🙄 Once they are loaded I can remove all objects and anchors and reload again and works fine.
So, it looks that I cannot load correctly the saved anchors unless I have previously saved one in the same session. I know that they are correctly saved because after creating a new anchor in the empty room I reload them succesfully.
Anyone else have this problem?
I am using Quest 2, Unity 2022.3.11, Meta XR Core 59.
The loading sequence is something like this:
OVRSpatialAnchor.LoadOptions options = new OVRSpatialAnchor.LoadOptions
{
Timeout = 0,
StorageLocation = OVRSpace.StorageLocation.Local,
Uuids = GetSavedAnchorsUuids()
};
OVRSpatialAnchor.LoadUnboundAnchors(options, _anchorSavedUUIDList =>
{
if (_anchorSavedUUIDList == null)
{
//Debug.Log("Anchor list is null!");
return;
}
....
}
