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

OVRRoomLayout Struct

Extends IOVRAnchorComponent< OVRRoomLayout >, IEquatable< OVRRoomLayout >
Represents a room described by its floor, ceiling and walls.
An OVRAnchor supports this component when it is a room anchor. Access this component by calling OVRAnchor.GetComponent<T> on a room anchor.
The room layout component is part of the Meta Quest Scene Model. Read more at Control flow for rooms and child anchors.

Public Statics

A null representation of an OVRRoomLayout.
Use this to compare with another component to determine whether it is null.

Properties

Whether this object represents a valid anchor component.
True if this component is enabled and no change to its enabled status is pending.
SpaceComponentType Type[Get]
ulong Handle[Get]

Member Functions

Compares this component for equality with other .
Parameters
other
The other component to compare with.
Returns
True if both components belong to the same OVRAnchor, otherwise false.
Compares this component for equality with obj .
Parameters
obj
The object to compare with.
Returns
True if obj is an OVRRoomLayout and Equals(OVRRoomLayout) is true, otherwise false.
Gets a hashcode suitable for use in a Dictionary or HashSet.
Returns
A hashcode for this component.
Gets a string representation of this component.
Returns
A string representation of this component.
(Obsolete) Asynchronous method that fetches anchors contained in the Room Layout.
Dispose of the returned task if you don't use the results
Parameters
anchors
List that will get cleared and populated with the requested anchors.
Deprecated
This method is obsolete. Use FetchAnchorsAsync instead.
Returns
Returns a task that will eventually let you test if the fetch was successful or not. If the result is true, then the anchors parameter has been populated with the requested anchors.
Exceptions
InvalidOperationException
If it fails to retrieve the Room Layout
ArgumentNullException
If parameter anchors is null
Fetches the anchors contained in the Room Layout.
Dispose of the returned task if you don't use the results.
Parameters
anchors
List that will get cleared and populated with the requested anchors.
Returns
A task that will eventually let you test if the fetch was successful or not. If the result is true, then the anchors parameter has been populated with the requested anchors.
Exceptions
InvalidOperationException
Thrown if the method fails to retrieve the Room Layout. This is usually because the anchor does not have a RoomLayout component.
ArgumentNullException
Thrown if anchors is null.
Tries to get the UUIDs of the Ceiling, Floor and Walls in the room layout.
The UUIDs can be passed to OVRAnchor.FetchAnchorsAsync(List<OVRAnchor>,OVRAnchor.FetchOptions,Action<List<OVRAnchor>, int>).You can also use FetchAnchorsAsync to combine this method with the fetch operation.
Parameters
ceiling
Out Guid representing the ceiling of the room.
floor
Out Guid representing the floor of the room.
walls
Out array of Guids representing the walls of the room.
Returns
Returns true if the request succeeds, otherwise false.

Static Member Functions

Compares two components for equality.
Parameters
lhs
The component to compare with rhs .
rhs
The component to compare with lhs .
Returns
True if both components belong to the same OVRAnchor, otherwise false.
Compares two components for inequality.
Parameters
lhs
The component to compare with rhs .
rhs
The component to compare with lhs .
Returns
True if the components do not belong to the same OVRAnchor, otherwise false.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon