06-15-2023 07:53 AM - edited 06-16-2023 02:13 AM
Can't save anchors to local. It works with the sample scene "SpatialAnchor" but not from my project.
Getting error:
OVRPlugin.SaveSpaceList failed with error Failure_OperationFailed
None of my debug lines below are fired, the error is fired from the OVRPlugin.
Is there any special authorization access to local storage or headset space access to allow somewhere in manifest or build settings?
public void SaveAnchor()
{
if (!_spatialAnchor)
{
var debugString = "No OVRSpatialAnchor found";
AnchorUIManager.Instance.debugTextBox.text = debugString;
return;
}
_spatialAnchor.Save((anchor, success) =>
{
if (!success)
{
var debugString2 = "Spatial anchor coudn't be saved.";
AnchorUIManager.Instance.debugTextBox.text = debugString2;
return;
}
var debugString = "Spatial anchor saved, now saving to playerPrefs...";
AnchorUIManager.Instance.debugTextBox.text = debugString;
SaveUuidToPlayerPrefs(anchor.Uuid);
});
}
}
06-23-2023 03:26 PM - edited 06-23-2023 03:26 PM
Found this post because I ran into the same errors this morning. You probably resolved it after a week but I'll just mention that you can get this error if you try to save the new OVRSpatialAnchor object immediately after creating it. The creation process is asynchronous - it's mentioned in the docs that the uuid is not immediately valid - but they don't seem to describe any callback process.
My use case is the user positions a grabbable object in the scene and then saves that position as a new anchor. So, what I'm doing now is after instantiating a new object with the OVRSpatialAnchor, call a coroutine that waits for newAnchor.Localized == true before attempting the save. I might try looking again to see if there's a way to get a newly created instance to trigger a callback.
01-25-2024 02:40 PM
Same problem. I can load anchors, but not save them.
01-31-2024 06:26 AM
I'm having this same issue in Meta XR Core SDK 60.0