C Specification
The xrUnshareAnchorANDROID function is defined as:
// Provided by XR_ANDROID_anchor_sharing_export
XrResult xrUnshareAnchorANDROID(
XrSession session,
XrSpace anchor);
Parameters
Description
The xrUnshareAnchorANDROID function invalidates previously shared
anchors.
This means that future uses of the anchor sharing token obtained when
xrShareAnchorANDROID was called must fail until the anchor is shared
again via xrShareAnchorANDROID.
The runtime must also invalidate previous imports of the anchor sharing
token and must not set XR_SPACE_LOCATION_POSITION_TRACKED_BIT or
XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT for the imported anchor’s
XrSpace.
This means that a previously imported anchor must stop tracking if the
original anchor is unshared by its parent session.
The runtime must return XR_ERROR_ANCHOR_NOT_OWNED_BY_CALLER_ANDROID
if the anchor is not owned by the same XrSession that is the parent of
XrAnchorSharingInfoANDROID::anchor.
An anchor that is not unshared explicitly by calling xrUnshareAnchorANDROID must be implicitly unshared by the runtime when the anchor is destroyed via xrDestroySpace, or when the parent XrSession is destroyed, including when the application that shared the anchor quits.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.