Implementing XR_FB_spatial_entity - Getting XR_ERROR_VALIDATION_FAILURE
Hello!
I am attempting to implement the OpenXR extension XR_FB_spatial_entity (https://developer.oculus.com/documentation/native/android/openxr-lsa-persist-content/). I am starting by implementing the function xrCreateSpatialAnchorFB. However, when I call this function during runtime, I get the return code "XR_ERROR_VALIDATION_FAILURE". Is there any way to get more information about what is causing this validation error?
I am writing my code in C# (using the StereoKit library). My call to the function looks something like:
public bool CreateAnchor()
{
Log.Info("Begin CreateAnchor");
var anchorCreateInfo = new XrSpatialAnchorCreateInfoFB();
anchorCreateInfo.next = IntPtr.Zero;
anchorCreateInfo.space = Backend.OpenXR.Space;
anchorCreateInfo.poseInSpace.orientation.w = 1;
anchorCreateInfo.time = Backend.OpenXR.Time;
XrResult result = xrCreateSpatialAnchorFB(
Backend.OpenXR.Session,
anchorCreateInfo,
out XrAsyncRequestIdFB requestId);
Log.Info($"xrCreateSpatialAnchorFB initiated. The request id is: {requestId}. Result: {result.ToString()}");
return result == XrResult.Success;
}
Any tips on how to debug this further?
Thanks,
Jack
