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

OVRSpace Struct

Extends IEquatable< OVRSpace >
Represents an XrSpace in the Oculus Runtime.
A "space" is an instance of an XrSpace in the OpenXR runtime and is used typically as the low-level handle of an anchor.
Deprecated
Most APIs that use OVRSpace are deprecated. For low-level access to anchors, use OVRAnchor instead.
Read more about anchors generally at Spatial Anchor Overview and Scene Overview.

Member Enumerations

Enumeration StorageLocation

Deprecated
Represents a storage location for an anchor.
Deprecated
APIs that accept a storage location are obsolete.
When you save (OVRSpatialAnchor.SaveAsync(OVRSpatialAnchor.SaveOptions), erase (OVRSpatialAnchor.EraseAsync(OVRSpatialAnchor.EraseOptions), or load (OVRSpatialAnchor.LoadUnboundAnchorsAsync(OVRSpatialAnchor.LoadOptions) a spatial anchor using these obsolete APIs, you may specify a storage location to indicate from where you would like to save, erase, or load the anchor(s), respectively.
Local
The storage location is local to the device.
Cloud
The storage location is in the cloud.

Properties

A runtime handle associated with this OVRSpace.
The handle can change between subsequent sessions. To refer to a persistent anchor, use TryGetUuid to get a unique identifier for the anchor.
Indicates whether this OVRSpace represents a valid space (vs a default constructed OVRSpace).

Member Functions

Retrieve the universally unique identifier (UUID) associated with this OVRSpace.
Every space that can be persisted will have a UUID associated with it. UUIDs are consistent across different sessions and apps.The UUID of a space does not change over time, but not all spaces are guaranteed to have a UUID.
Parameters
uuid
If successful, the uuid associated with this OVRSpace, otherwise, Guid.Empty.
Returns
Returns true if the uuid could be retrieved, otherwise false.
Constructs an OVRSpace object from an existing runtime handle and UUID.
This constructor does not create a new space. An OVRSpace is a wrapper for low-level functionality in the Oculus Runtime. To create a new spatial anchor, use OVRSpatialAnchor.
Parameters
handle
The runtime handle associated with the space.
Generates a string representation of this OVRSpace of the form "0xYYYYYYYY" where "Y" are the hexadecimal digits of the Handle.
Returns
Returns a string representation of this OVRSpace.
Compares for equality with another space.
Parameters
other
The OVRSpace to compare for equality with this space.
Returns
Returns true if the two spaces represent the same space instance, otherwise false.
Compares for equality with an object.
Parameters
obj
The object to compare for equality with this space.
Returns
Returns true if obj is an OVRSpace and represents the same space instance as this one, otherwise false.
Generates a hash code suitable for use in a Dictionary or HashSet
Returns
Returns a hash code suitable for use in a Dictionary or HashSet

Static Member Functions

Compares two spaces for equality.
This is the same equality test as Equals(OVRSpace).
Parameters
lhs
The space to compare with rhs .
rhs
The space to compare with lhs .
Returns
Returns true if lhs is equal to rhs , otherwise false.
Compares two spaces for inequality.
This is the logical negation of Equals(OVRSpace).
Parameters
lhs
The space to compare with rhs .
rhs
The space to compare with lhs .
Returns
Returns true if lhs is not equal to rhs , otherwise false.
Casts a ulong handle to an OVRSpace.
Parameters
handle
The handle of the XrSpace to convert.
Returns
Returns the handle as an OVRSpace.
Casts an OVRSpace to its underlying XrSpace handle.
Parameters
space
The OVRSpace to cast.
Returns
Returns the XrSpace handle of the OVRSpace.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon