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

SpatialAnchorCoreBuildingBlock Class

Extends MonoBehaviour

Protected Properties

Signature
OVRSpatialAnchor.OperationResult Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.Result

Properties

OnAnchorCreateCompleted : UnityEvent< OVRSpatialAnchor, OVRSpatialAnchor.OperationResult >
[Get][Set]
Signature
UnityEvent<OVRSpatialAnchor, OVRSpatialAnchor.OperationResult> Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.OnAnchorCreateCompleted
OnAnchorEraseCompleted : UnityEvent< OVRSpatialAnchor, OVRSpatialAnchor.OperationResult >
[Get][Set]
Signature
UnityEvent<OVRSpatialAnchor, OVRSpatialAnchor.OperationResult> Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.OnAnchorEraseCompleted
OnAnchorsEraseAllCompleted : UnityEvent< OVRSpatialAnchor.OperationResult >
[Get][Set]
Signature
UnityEvent<OVRSpatialAnchor.OperationResult> Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.OnAnchorsEraseAllCompleted
OnAnchorsLoadCompleted : UnityEvent< List< OVRSpatialAnchor > >
[Get][Set]
This should only be used for normal Spatial Anchors, use OnSharedSpatialAnchorsLoadCompleted for Shared Spatial Anchor loaded event.
Signature
UnityEvent<List<OVRSpatialAnchor> > Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.OnAnchorsLoadCompleted

Protected Methods

LoadAnchorsAsync ( prefab , uuids )
Signature
async void Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.LoadAnchorsAsync(GameObject prefab, IEnumerable< Guid > uuids)
Parameters
prefab: GameObject
uuids: IEnumerable< Guid >
Returns
async void
SaveAsync ( anchor )
Signature
async Task Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.SaveAsync(OVRSpatialAnchor anchor)
Parameters
Returns
async Task
WaitForInit ( anchor )
Signature
async Task Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.WaitForInit(OVRSpatialAnchor anchor)
Parameters
Returns
async Task

Methods

EraseAllAnchors ()
Erase all instantiated anchors anchors.
It'll collect the uuid(s) of the instantiated anchor(s) and erase them.
Signature
void Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.EraseAllAnchors()
Returns
void
EraseAnchorByUuid ( uuid )
Erase a anchor by Guid.
Signature
async void Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.EraseAnchorByUuid(Guid uuid)
Parameters
uuid: Guid  Anchor's uuid to erase.
Returns
async void
InstantiateSpatialAnchor ( prefab , position , rotation )
Create an spatial anchor.
Signature
void Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.InstantiateSpatialAnchor(GameObject prefab, Vector3 position, Quaternion rotation)
Parameters
prefab: GameObject  A prefab to add the OVRSpatialAnchor component.
position: Vector3  Position for the new anchor.
rotation: Quaternion  Orientation of the new anchor
Returns
void
LoadAndInstantiateAnchors ( prefab , uuids )
Load and instantiate anchors from a list of uuids.
Signature
void Meta.XR.BuildingBlocks.SpatialAnchorCoreBuildingBlock.LoadAndInstantiateAnchors(GameObject prefab, List< Guid > uuids)
Parameters
prefab: GameObject  Prefab for instantiating the loaded anchors.
uuids: List< Guid >  List of anchor's uuid to load.
Returns
void