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

SharedSpatialAnchorCore Class

A helper class for creating, loading, erasing, and sharing a OVRSpatialAnchor easily.
Use LoadAndInstantiateAnchors to load an instantiate a list of anchors, and OnSharedSpatialAnchorsLoadCompleted to be notified when the loading is completed. Use InstantiateSpatialAnchor to create an instantiate a single anchor based on a prefab. Use ShareSpatialAnchors to share a list of anchors, and OnSpatialAnchorsShareCompleted to be notified when the sharing is completed. See Building Blocks for more information.

Properties

This event will be triggered when the sharing of a list of OVRSpatialAnchor(s) is completed.
UnityEvent< List< OVRSpatialAnchor >, OVRAnchor.ShareResult > OnSpatialAnchorsShareToGroupCompleted[Get]
This event will be triggered when the loading of a list of shared OVRSpatialAnchor(s) is completed.

Member Functions

Create and instantiate an OVRSpatialAnchor.
Parameters
prefab
A prefab to instantiate as a OVRSpatialAnchor.
position
Initial position of instantiated GameObject.
rotation
Initial rotation of instantiated GameObject.
Loads and instantiates OVRSpatialAnchor(s) from a list of Guids.
Use OnSharedSpatialAnchorsLoadCompleted to be notified when the loading is completed.
Parameters
prefab
A prefab to instantiate as a OVRSpatialAnchor.
uuids
A list of Guid(s) to load.
Exceptions
ArgumentNullException
Throws when uuids is null.
ArgumentException
Throws when uuids list is empty.
Loads and instantiates OVRSpatialAnchor(s) from a ColocationSession group represented by Guid.
Use OnSharedSpatialAnchorsLoadCompleted to be notified when the loading is completed.
Parameters
prefab
A prefab to instantiate as a OVRSpatialAnchor.
groupUuid
Representing the ColocationSession group used for retrieve the anchors.
Shares a list of OVRSpatialAnchor(s) with a list of OVRSpaceUser(s).
Use OnSpatialAnchorsShareCompleted to be notified when the sharing is completed.
Parameters
anchors
A list of OVRSpatialAnchor(s) to share.
users
A list of OVRSpaceUser to share OVRSpatialAnchor(s) with.
Exceptions
ArgumentNullException
Throws when anchors or users is null.
ArgumentException
Throws when anchors or users list is empty.
Shares a list of OVRSpatialAnchor(s) with a ColocationSession group represented by a Guid.
Use OnSpatialAnchorsShareToGroupCompleted to be notified when the sharing is completed.
Parameters
anchors
A list of OVRSpatialAnchor(s) to share.
groupUuid
A group uuid to share the anchors with.
Exceptions
ArgumentNullException
Throws when anchors is null.
ArgumentException
Throws when anchors list is empty.