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

SpatialAnchorSpawnerBuildingBlock Class

Extends MonoBehaviour
A utility class to manage instantiation of an OVRSpatialAnchor GameObject.
By default OVRSpatialAnchor will be spawned at user's hand's / controller's position. Disable FollowHand property to spawn the OVRSpatialAnchor at the specified position and orientation. See SpatialAnchorCoreBuildingBlock.OnAnchorCreateCompleted event to get notified when the anchor is created. See also Editor/BuildingBlocks/BlockData/SampleSpatialAnchorController in the Meta XR Core SDK for an example of how to use this class.
See Also
BuildingBlock

Properties

A prefab to instantiate.
Indicates whether the OVRSpatialAnchor source prefab you instantiate will follow the user's hand.

Member Functions

Spawns a new OVRSpatialAnchor for the AnchorPrefab in the provided position and the provided orientation.
Parameters
position
Position for the new anchor.
rotation
Orientation of the new anchor