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

OVRSceneAnchor Class

Extends MonoBehaviour
Represents a scene anchor.
A scene anchor is a type of anchor that is provided by the system. It represents an item in the physical environment, such as a plane or volume. Scene anchors are created by the OVRSceneManager.

Properties

The runtime handle of this scene anchor.
The universally unique identifier for this scene anchor.
Associated OVRAnchor.
Indicates whether this anchor is tracked by the system.

Member Functions

void Initialize
( OVRAnchor anchor )
Initializes this scene anchor from an existing scene anchor.
Parameters
other
An existing OVRSceneAnchor from which to initialize this scene anchor.
Exceptions
ArgumentNullException
Thrown if other is null.
InvalidOperationException
Thrown if this OVRSceneAnchor is already associated with a scene anchor.

Static Member Functions

Get the list of all scene anchors that the OVRSceneManager created.
Anchor components such as OVRSceneRoom, OVRScenePlane, and OVRSceneVolume all have a OVRSceneAnchor component, so this method should be used to find those sibling components.
Parameters
anchors
A list of OVRSceneAnchors to populate. Any existing elements in the list will be removed.
Exceptions
ArgumentNullException
Thrown if anchors is null.
Get the list of all scene anchors filtered by type.
Anchor components such as OVRSceneRoom, OVRScenePlane, and OVRSceneVolume all have a OVRSceneAnchor component, so this method should be used to find those sibling components.This method traverses all OVRSceneAnchor instantiated by the OVRSceneManager and filters them based on whether they have the given component.
Others
T
The type of component the OVRSceneAnchor must have.
Parameters
anchors
A list of components of type T to populate. Any existing elements in the list will be removed.
Exceptions
ArgumentNullException
Thrown if anchors is null.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon