OpenXRSpatialContainerExtension
OpenXR extension that handles spatial containers.
OpenXR extension that handles spatial containers.
OpenXR extension that handles spatial containers. Enabling this extension will automatically create a main spatial container, and update the lifecycle of the XR application.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRSpatialContainerExtensionConstructor
public OpenXRSpatialContainerExtension();Methods7
GetSpatialContainerBoundsVector3
public Vector3 GetSpatialContainerBounds();Retrieves the bounds of the main spatial container.
Vector3GetSpatialContainerStateOpenXRSpatialContainerState
public OpenXRSpatialContainerState GetSpatialContainerState();Retrieves the OpenXRSpatialContainerState of the main spatial container.
OpenXRSpatialContainerStateGetSupportedBoundsModesReckfell.Collections.Array
public Reckfell.Collections.Array GetSupportedBoundsModes();Returns an array of supported spatial container bounds mode, see OpenXRSpatialContainerState.BoundsMode.
Reckfell.Collections.ArrayIsEnabledbool
public bool IsEnabled();Returns true if spatial containers are enabled in the project settings and available on the current runtime.
boolIsSpatialContainerActivebool
public bool IsSpatialContainerActive();Returns true if the main spatial container is active.
boolRequestSpatialContainerBoundsModebool
public bool RequestSpatialContainerBoundsMode(OpenXRSpatialContainerState.BoundsMode boundsMode);Sends a request to the runtime to update the bounds mode of the main spatial container.
If the request is accepted, OpenXRSpatialContainerExtension.SpatialContainerBoundsChanged will be emitted with the updated bounds mode.
Otherwise, OpenXRSpatialContainerExtension.SpatialContainerBoundsModeRequestDenied will be emitted.
| Name | Type | Default |
|---|---|---|
boundsMode | OpenXRSpatialContainerState.BoundsMode | — |
boolRequestSpatialContainerVisiblebool
public bool RequestSpatialContainerVisible(bool visible);Sends a request to the runtime to update the visibility of the spatial container.
If the request is accepted, OpenXRSpatialContainerExtension.SpatialContainerVisibleChanged will be emitted with the updated visibility.
Otherwise, OpenXRSpatialContainerExtension.SpatialContainerVisibleRequestDenied will be emitted.
| Name | Type | Default |
|---|---|---|
visible | bool | — |
boolSignals and events6
SpatialContainerBoundsChangedEvent
public event OpenXRSpatialContainerExtension.SpatialContainerBoundsChangedEventHandler SpatialContainerBoundsChanged;Emitted when the bounds of the spatial container specified by spatial_container_rid are updated.
| Name | Type | Default |
|---|---|---|
spatialContainerRid | Rid | — |
spatialContainerInfiniteBounds | bool | — |
spatialContainerBoundsMode | long | — |
spatialContainerBounds | Vector3 | — |
SpatialContainerBoundsModeRequestDeniedEvent
public event OpenXRSpatialContainerExtension.SpatialContainerBoundsModeRequestDeniedEventHandler SpatialContainerBoundsModeRequestDenied;Emitted when a request to update the bounds mode of the spatial container specified by spatial_container_rid is denied by the runtime.
| Name | Type | Default |
|---|---|---|
spatialContainerRid | Rid | — |
SpatialContainerClosedEvent
public event OpenXRSpatialContainerExtension.SpatialContainerClosedEventHandler SpatialContainerClosed;Emitted when the spatial container specified by spatial_container_rid is closed.
| Name | Type | Default |
|---|---|---|
spatialContainerRid | Rid | — |
SpatialContainerInteractableChangedEvent
public event OpenXRSpatialContainerExtension.SpatialContainerInteractableChangedEventHandler SpatialContainerInteractableChanged;Emitted when the interactability of the spatial container specified by spatial_container_rid is updated.
| Name | Type | Default |
|---|---|---|
spatialContainerRid | Rid | — |
spatialContainerInteractable | bool | — |
SpatialContainerVisibleChangedEvent
public event OpenXRSpatialContainerExtension.SpatialContainerVisibleChangedEventHandler SpatialContainerVisibleChanged;Emitted when the visibility of the spatial container specified by spatial_container_rid is updated.
| Name | Type | Default |
|---|---|---|
spatialContainerRid | Rid | — |
spatialContainerVisible | bool | — |
SpatialContainerVisibleRequestDeniedEvent
public event OpenXRSpatialContainerExtension.SpatialContainerVisibleRequestDeniedEventHandler SpatialContainerVisibleRequestDenied;Emitted when the runtime denies the visibility request of the spatial container specified by spatial_container_rid.
| Name | Type | Default |
|---|---|---|
spatialContainerRid | Rid | — |