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

OVRRoomLayout Struct

Extends 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.

Static Fields

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

Properties

IsEnabled : bool
[Get]
True if this component is enabled and no change to its enabled status is pending.
Signature
bool IsEnabled
IsNull : bool
[Get]
Whether this object represents a valid anchor component.
Signature
bool IsNull

Methods

Equals ( other )
Compares this component for equality with other .
Signature
bool Equals(OVRRoomLayout other)
Parameters
other: OVRRoomLayout  The other component to compare with.
Returns
bool  True if both components belong to the same OVRAnchor, otherwise false.
Equals ( obj )
Compares this component for equality with obj .
Signature
override bool Equals(object obj)
Parameters
obj: object  The object to compare with.
Returns
override bool  True if obj is an OVRRoomLayout and Equals(OVRRoomLayout) is true, otherwise false.
FetchAnchorsAsync ( anchors )
Fetches the anchors contained in the Room Layout.
Dispose of the returned task if you don't use the results.
Signature
OVRTask< OVRResult< List< OVRAnchor >, OVRAnchor.FetchResult > > FetchAnchorsAsync(List< OVRAnchor > anchors)
Parameters
anchors: List< OVRAnchor >  List that will get cleared and populated with the requested anchors.
Returns
OVRTask< OVRResult< List< OVRAnchor >, OVRAnchor.FetchResult > >  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.
Throws
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.
FetchLayoutAnchorsAsync ( anchors )
(Obsolete) Asynchronous method that fetches anchors contained in the Room Layout.
DeprecatedThis method is obsolete. Use FetchAnchorsAsync instead.
Dispose of the returned task if you don't use the results
Signature
OVRTask< bool > FetchLayoutAnchorsAsync(List< OVRAnchor > anchors)
Parameters
anchors: List< OVRAnchor >  List that will get cleared and populated with the requested anchors.
Returns
OVRTask< bool >  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.
Throws
InvalidOperationException  If it fails to retrieve the Room Layout ArgumentNullException  If parameter anchors is null
GetHashCode ()
Gets a hashcode suitable for use in a Dictionary or HashSet.
Signature
override int GetHashCode()
Returns
override int  A hashcode for this component.
ToString ()
Gets a string representation of this component.
Signature
override string ToString()
Returns
override string  A string representation of this component.
TryGetRoomLayout ( ceiling , floor , walls )
Tries to get the UUIDs of the Ceiling, Floor and Walls in the room layout.
You can also use FetchAnchorsAsync to combine this method with the fetch operation.
Signature
bool TryGetRoomLayout(out Guid ceiling, out Guid floor, out Guid[] walls)
Parameters
ceiling: out Guid  Out Guid representing the ceiling of the room.
floor: out Guid  Out Guid representing the floor of the room.
walls: out Guid[]  Out array of Guids representing the walls of the room.
Returns
bool  Returns true if the request succeeds, otherwise false.

Static Methods

operator!= ( lhs , rhs )
Compares two components for inequality.
Signature
static bool operator!=(OVRRoomLayout lhs, OVRRoomLayout rhs)
Parameters
lhs: OVRRoomLayout  The component to compare with rhs .
rhs: OVRRoomLayout  The component to compare with lhs .
Returns
bool  True if the components do not belong to the same OVRAnchor, otherwise false.
operator== ( lhs , rhs )
Compares two components for equality.
Signature
static bool operator==(OVRRoomLayout lhs, OVRRoomLayout rhs)
Parameters
lhs: OVRRoomLayout  The component to compare with rhs .
rhs: OVRRoomLayout  The component to compare with lhs .
Returns
bool  True if both components belong to the same OVRAnchor, otherwise false.