Forum Discussion
Viconthebeach
3 years agoProtege
Getting error when saving OVRSpatialAnchor to local
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);
});
}
}
3 Replies
Replies have been turned off for this discussion
- JavaMcgeeHonored Guest
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.
- sabintmHonored Guest
Same problem. I can load anchors, but not save them.
- user.36997Explorer
I'm having this same issue in Meta XR Core SDK 60.0
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 months ago
- 8 months ago