API reference
API reference
Select your platform
No SDKs available
No versions available

SharedSpatialAnchorErrorHandler Class

Extends MonoBehaviour
A utility MonoBehaviour component to handle Shared Spatial Anchor's operational errors.
This component will spawn a visual alert box with error message at runtime. The public methods are meant to be used as listeners for Shared Spatial Anchor's operations. See Editor/BuildingBlocks/BlockData/SampleSpatialAnchorController in the Meta XR Core SDK for an example of how to use this class.

Fields

DisableRuntimeGUIAlerts : bool
Disables message alert box at runtime.
Signature
bool DisableRuntimeGUIAlerts

Methods

OnAnchorCreate ( _ , result )
Handles the OnAnchorCreateCompleted event by logging "Failed to share the spatial anchor.".
If there is a cloud storage error, it will log that instead.
Signature
void OnAnchorCreate(OVRSpatialAnchor _, OVRSpatialAnchor.OperationResult result)
Parameters
result: OVRSpatialAnchor.OperationResult  Contains the OVRSpatialAnchor creation result.
Returns
void
OnAnchorErase ( anchor , result )
Handles the OnAnchorEraseCompleted event by logging "Failed to erase the spatial anchor with uuid: " and the uuid of the anchor.
Signature
void OnAnchorErase(OVRSpatialAnchor anchor, OVRSpatialAnchor.OperationResult result)
Returns
void
OnAnchorEraseAll ( result )
Handles the OnAnchorsEraseAllCompleted event by logging "Failed to erase the spatial anchor(s).".
Signature
void OnAnchorEraseAll(OVRSpatialAnchor.OperationResult result)
Returns
void
OnAnchorShare ( _ , result )
Propagates OVRSpatialAnchor share failure message.
Signature
void OnAnchorShare(List< OVRSpatialAnchor > _, OVRSpatialAnchor.OperationResult result)
Parameters
_: List< OVRSpatialAnchor >
result: OVRSpatialAnchor.OperationResult  Contains the OVRSpatialAnchor share result.
Returns
void
OnSharedSpatialAnchorLoad ( loadedAnchors , result )
Handles the OnSharedSpatialAnchorsLoadCompleted event by logging "Failed to load the spatial anchor(s).".
If there is a cloud storage error, it will log that instead.
Signature
void OnSharedSpatialAnchorLoad(List< OVRSpatialAnchor > loadedAnchors, OVRSpatialAnchor.OperationResult result)
Parameters
loadedAnchors: List< OVRSpatialAnchor >
result: OVRSpatialAnchor.OperationResult  Contains the OVRSpatialAnchor load result.
Returns
void