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

Anchor : OVRAnchor
[Get]
Associated OVRAnchor.
Signature
OVRAnchor OVRSceneAnchor.Anchor
IsTracked : bool
[Get]
Indicates whether this anchor is tracked by the system.
Signature
bool OVRSceneAnchor.IsTracked
Space : OVRSpace
[Get]
The runtime handle of this scene anchor.
Signature
OVRSpace OVRSceneAnchor.Space
Uuid : Guid
[Get]
The universally unique identifier for this scene anchor.
Signature
Guid OVRSceneAnchor.Uuid

Methods

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

Static Methods

GetSceneAnchors ( anchors )
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.
Signature
static void OVRSceneAnchor.GetSceneAnchors(List< OVRSceneAnchor > anchors)
Parameters
anchors: List< OVRSceneAnchor >  A list of OVRSceneAnchors to populate. Any existing elements in the list will be removed.
Returns
void
Throws
ArgumentNullException  Thrown if anchors is null.
GetSceneAnchorsOfType< T > ( anchors )
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.
Signature
static void OVRSceneAnchor.GetSceneAnchorsOfType< T >(List< T > anchors)
Parameters
anchors: List< T >  A list of components of type T to populate. Any existing elements in the list will be removed.
Returns
void
Throws
ArgumentNullException  Thrown if anchors is null.