10-17-2024 06:47 AM - edited 10-17-2024 07:10 AM
I saved the anchors' uuid in the playerprefs after creating them - it's getting created successfully.
Then, I tried to load the anchors in the same session without quitting the app (my use case is to visually clear the anchors after saving and loading them on the user's command) - the resultant anchors-array from LoadingUnboundAnchors is NOT null but it contains only anchors from last session.
Once I quit and reopen the app, the anchors are loading successfully.
I want to load them before quitting the app as well (I mean in the same session). Any ideas on why this is not happening?? Or any suggestions on how to implement this?
OVRSpatialAnchor.LoadUnboundAnchorsAsync(loadOptions).ContinueWith(anchors =>
{
if(anchors == null)
{
Debug.Log("Anchor Sample: Load anchors failed with null result.");
}
Debug.Log($"Anchor Sample: anchors available {anchors.Length}"); //length is zero if loaded in the same session or it is equal to the number of anchors created till the last session
});