Class OpenXRNativeApi
OpenXR native API.
For more information, refer to OpenXR native API in the user manual.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public static class OpenXRNativeApi
Methods
xrCancelFutureEXT(ulong)
Cancels the given future for the current instance and signals that the async operation is not required.
Provided by XR_EXT_future. This convenience overload creates an XrFutureCancelInfoEXT on your
behalf using the given future.
Declaration
public static OpenXRResultStatus xrCancelFutureEXT(ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | future | The future. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this future.
After the future has been cancelled, any functions using this future must return FutureInvalidEXT.
xrCancelFutureEXT(ulong, in XrFutureCancelInfoEXT)
Cancels the given future and signals that the async operation is not required.
Provided by XR_EXT_future.
Declaration
public static extern XrResult xrCancelFutureEXT(ulong instance, in XrFutureCancelInfoEXT cancelInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance for which the future in cancelInfo was returned. |
| XrFutureCancelInfoEXT | cancelInfo | The cancel info. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this future. After the future has been cancelled, any functions using this future must return FutureInvalidEXT.
xrCancelFutureEXT(in XrFutureCancelInfoEXT)
Cancels the given future for the current instance and signals that the async operation is not required.
Provided by XR_EXT_future.
Declaration
public static extern OpenXRResultStatus xrCancelFutureEXT(in XrFutureCancelInfoEXT cancelInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| XrFutureCancelInfoEXT | cancelInfo | The cancel info. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this future.
After the future has been cancelled, any functions using this future must return FutureInvalidEXT.
xrCreateSpatialAnchorEXT(ulong, Vector3, Quaternion, out ulong, out ulong)
Creates an anchor in your app space at the next frame's predicted display time,
allowing you to track the given position and rotation within the given spatial context.
Provided by XR_EXT_spatial_anchor.
Declaration
public static OpenXRResultStatus xrCreateSpatialAnchorEXT(ulong spatialContext, Vector3 position, Quaternion rotation, out ulong anchorEntityId, out ulong anchorEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using
|
| Vector3 | position | The position, in Unity coordinates relative to your XR Origin, at which to create the anchor. |
| Quaternion | rotation | The rotation, in Unity coordinates relative to your XR Origin, to use for the anchor. |
| ulong | anchorEntityId | The ID of the created anchor entity. |
| ulong | anchorEntity | The spatial entity handle of the created anchor entity. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialAnchorEXT(ulong, in XrPosef, out ulong, out ulong)
Creates an anchor in your app space at the next frame's predicted display time,
allowing you to track the given position and rotation within the given spatial context.
Provided by XR_EXT_spatial_anchor.
Declaration
public static extern OpenXRResultStatus xrCreateSpatialAnchorEXT(ulong spatialContext, in XrPosef pose, out ulong anchorEntityId, out ulong anchorEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using
|
| XrPosef | pose | The pose, in OpenXR coordinates, at which to create the anchor. |
| ulong | anchorEntityId | The ID of the created anchor entity. |
| ulong | anchorEntity | The spatial entity handle of the created anchor entity. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialAnchorEXT(ulong, in XrSpatialAnchorCreateInfoEXT, out ulong, out ulong)
Creates an anchor, allowing you to track the given position and rotation within the given spatial context.
Provided by XR_EXT_spatial_anchor.
Declaration
public static extern XrResult xrCreateSpatialAnchorEXT(ulong spatialContext, in XrSpatialAnchorCreateInfoEXT createInfo, out ulong anchorEntityId, out ulong anchorEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using
|
| XrSpatialAnchorCreateInfoEXT | createInfo | The creation info. |
| ulong | anchorEntityId | The ID of the created anchor entity. |
| ulong | anchorEntity | The spatial entity handle of the created anchor entity. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialContextAsyncEXT(ulong, in XrSpatialContextCreateInfoEXT, out ulong)
Creates a spatial context scoped to the given session. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialContextAsyncEXT(ulong session, in XrSpatialContextCreateInfoEXT createInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | session | The session in which the spatial context will be active. |
| XrSpatialContextCreateInfoEXT | createInfo | The information used to specify the spatial context parameters. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialContextAsyncEXT(in XrSpatialContextCreateInfoEXT, out ulong)
Creates a spatial context scoped to the current session. Provided by XR_EXT_spatial_entity.
Declaration
public static extern OpenXRResultStatus xrCreateSpatialContextAsyncEXT(in XrSpatialContextCreateInfoEXT createInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialContextCreateInfoEXT | createInfo | The information used to specify the spatial context parameters. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialContextCompleteEXT(ulong, ulong, out XrCreateSpatialContextCompletionEXT)
Completes the asynchronous operation started by OpenXRNativeAPI.xrCreateSpatialContextAsyncEXT.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrCreateSpatialContextCompleteEXT(ulong session, ulong future, out XrCreateSpatialContextCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | session | The |
| ulong | future | The future received from |
| XrCreateSpatialContextCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
completion.spatialContext is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
See Also
xrCreateSpatialContextCompleteEXT(ulong, out XrCreateSpatialContextCompletionEXT)
Completes the asynchronous operation started by OpenXRNativeAPI.xrCreateSpatialContextAsyncEXT.
Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrCreateSpatialContextCompleteEXT(ulong future, out XrCreateSpatialContextCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | future | The future received from |
| XrCreateSpatialContextCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
completion.spatialContext is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
See Also
xrCreateSpatialDiscoverySnapshotAsyncEXT(ulong, in XrSpatialDiscoverySnapshotCreateInfoEXT, out ulong)
Creates a discovery snapshot for the given spatial context. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialDiscoverySnapshotAsyncEXT(ulong spatialContext, in XrSpatialDiscoverySnapshotCreateInfoEXT createInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created by using an overload of
|
| XrSpatialDiscoverySnapshotCreateInfoEXT | createInfo | The creation info for the discovery snapshot. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialDiscoverySnapshotCompleteEXT(ulong, ulong, out XrCreateSpatialDiscoverySnapshotCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialDiscoverySnapshotAsyncEXT,
using your app space and frame's predicted display time. Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrCreateSpatialDiscoverySnapshotCompleteEXT(ulong spatialContext, ulong future, out XrCreateSpatialDiscoverySnapshotCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | The spatial context previously passed to xrCreateSpatialDiscoverySnapshotAsyncEXT. |
| ulong | future | The future. |
| XrCreateSpatialDiscoverySnapshotCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialDiscoverySnapshotCompleteEXT(ulong, in XrCreateSpatialDiscoverySnapshotCompletionInfoEXT, out XrCreateSpatialDiscoverySnapshotCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialDiscoverySnapshotAsyncEXT.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrCreateSpatialDiscoverySnapshotCompleteEXT(ulong spatialContext, in XrCreateSpatialDiscoverySnapshotCompletionInfoEXT createSnapshotCompletionInfo, out XrCreateSpatialDiscoverySnapshotCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | The spatial context previously passed to xrCreateSpatialDiscoverySnapshotAsyncEXT. |
| XrCreateSpatialDiscoverySnapshotCompletionInfoEXT | createSnapshotCompletionInfo | The completion info. |
| XrCreateSpatialDiscoverySnapshotCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialEntityFromIdEXT(ulong, in XrSpatialEntityFromIdCreateInfoEXT, out ulong)
Creates a spatial entity handle from the given spatial entity ID. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialEntityFromIdEXT(ulong spatialContext, in XrSpatialEntityFromIdCreateInfoEXT createInfo, out ulong spatialEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A valid spatial context. |
| XrSpatialEntityFromIdCreateInfoEXT | createInfo | The creation info. |
| ulong | spatialEntity | The output spatial entity handle. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialPersistenceContextAsyncEXT(ulong, in XrSpatialPersistenceContextCreateInfoEXT, out ulong)
Creates persistence context scoped to the given session.
Declaration
public static extern XrResult xrCreateSpatialPersistenceContextAsyncEXT(ulong session, in XrSpatialPersistenceContextCreateInfoEXT createInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | session | The session in which the persistence context will be active. |
| XrSpatialPersistenceContextCreateInfoEXT | createInfo | The creation info. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialPersistenceContextAsyncEXT(in XrSpatialPersistenceContextCreateInfoEXT, out ulong)
Creates a persistence context scoped to the current session.
Declaration
public static extern OpenXRResultStatus xrCreateSpatialPersistenceContextAsyncEXT(in XrSpatialPersistenceContextCreateInfoEXT createInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialPersistenceContextCreateInfoEXT | createInfo | The creation info. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialPersistenceContextCompleteEXT(ulong, ulong, out XrCreateSpatialPersistenceContextCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialPersistenceContextAsyncEXT(ulong, in XrSpatialPersistenceContextCreateInfoEXT, out ulong).
Provided by XR_EXT_spatial_persistence.
Declaration
public static XrResult xrCreateSpatialPersistenceContextCompleteEXT(ulong session, ulong future, out XrCreateSpatialPersistenceContextCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | session | The session previously passed to |
| ulong | future | The future previously received from |
| XrCreateSpatialPersistenceContextCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
completion is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialPersistenceContextCompleteEXT(ulong, out XrCreateSpatialPersistenceContextCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialPersistenceContextAsyncEXT(in XrSpatialPersistenceContextCreateInfoEXT, out ulong).
Provided by XR_EXT_spatial_persistence.
Declaration
public static OpenXRResultStatus xrCreateSpatialPersistenceContextCompleteEXT(ulong future, out XrCreateSpatialPersistenceContextCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | future | The future previously received from |
| XrCreateSpatialPersistenceContextCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
completion is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrCreateSpatialUpdateSnapshotEXT(ulong, uint, ulong*, uint, XrSpatialComponentTypeEXT*, out ulong)
Creates a spatial update snapshot using your app space and the frame's predicted display time.
A spatial update snapshot contains the latest component data for given entities.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern OpenXRResultStatus xrCreateSpatialUpdateSnapshotEXT(ulong spatialContext, uint entityCount, ulong* entities, uint componentTypeCount, XrSpatialComponentTypeEXT* componentTypes, out ulong snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using an overload of
|
| uint | entityCount | The count of elements in |
| ulong* | entities | Pointer to an array of entities for which the runtime must include component data in the snapshot. |
| uint | componentTypeCount | The count of elements in |
| XrSpatialComponentTypeEXT* | componentTypes | Pointer to an array of component types for which the runtime must include data in the snapshot. |
| ulong | snapshot | The output snapshot. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
Warning
You can create any number of snapshots according to your use case, but be mindful of the memory that is allocated for each new snapshot. Destroy snapshots once you no longer need them using xrDestroySpatialSnapshotEXT(ulong).
See Also
xrCreateSpatialUpdateSnapshotEXT(ulong, NativeArray<ulong>, NativeArray<XrSpatialComponentTypeEXT>, out ulong)
Creates a spatial update snapshot using your app space and the frame's predicted display time.
A spatial update snapshot contains the latest component data for given entities.
Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrCreateSpatialUpdateSnapshotEXT(ulong spatialContext, NativeArray<ulong> entities, NativeArray<XrSpatialComponentTypeEXT> componentTypes, out ulong snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using an overload of
|
| NativeArray<ulong> | entities | Array of entities for which the runtime must include component data in the snapshot. |
| NativeArray<XrSpatialComponentTypeEXT> | componentTypes | Array of component types for which the runtime must include data in the snapshot. |
| ulong | snapshot | The output snapshot. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
Warning
You can create any number of snapshots according to your use case, but be mindful of the memory that is allocated for each new snapshot. Destroy snapshots once you no longer need them using xrDestroySpatialSnapshotEXT(ulong).
See Also
xrCreateSpatialUpdateSnapshotEXT(ulong, in XrSpatialUpdateSnapshotCreateInfoEXT, out ulong)
Creates a spatial update snapshot, which contains the latest component data for given entities
as specified by the creation info. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialUpdateSnapshotEXT(ulong spatialContext, in XrSpatialUpdateSnapshotCreateInfoEXT createInfo, out ulong snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using an overload of
|
| XrSpatialUpdateSnapshotCreateInfoEXT | createInfo | The creation info. |
| ulong | snapshot | Pointer to the created spatial update snapshot if this method returns a success code.
Otherwise, |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Warning
You can create any number of snapshots according to your use case, but be mindful of the memory that is allocated for each new snapshot. Destroy snapshots once you no longer need them using xrDestroySpatialSnapshotEXT.
See Also
xrDestroySpatialContextEXT(ulong)
Destroys the given spatial context. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrDestroySpatialContextEXT(ulong spatialContext)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using
|
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this spatial context.
xrDestroySpatialEntityEXT(ulong)
Destroys the given spatial entity handle. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrDestroySpatialEntityEXT(ulong spatialEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialEntity | The spatial entity handle. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this spatial entity handle.
xrDestroySpatialPersistenceContextEXT(ulong)
Releases the given persistence context handle. Provided by XR_EXT_spatial_persistence.
Declaration
public static extern XrResult xrDestroySpatialPersistenceContextEXT(ulong persistenceContext)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | persistenceContext | The persistence context. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this persistence context.
xrDestroySpatialSnapshotEXT(ulong)
Destroys the given spatial snapshot handle and the resources associated with it.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrDestroySpatialSnapshotEXT(ulong snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | A spatial snapshot previously created by methods such as
|
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Warning
You are responsible to synchronize this operation with any other threads you created that use this spatial snapshot.
See Also
xrEnumerateSpatialCapabilitiesEXT(uint, out uint, XrSpatialCapabilityEXT*)
Enumerates the spatial capabilities that are supported by the current system.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern OpenXRResultStatus xrEnumerateSpatialCapabilitiesEXT(uint capabilityCountInput, out uint capabilityCountOutput, XrSpatialCapabilityEXT* capabilities)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | capabilityCountInput | The capacity of |
| uint | capabilityCountOutput | The count of elements in |
| XrSpatialCapabilityEXT* | capabilities | Pointer to an array of capabilities. Can be null if
|
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrEnumerateSpatialCapabilitiesEXT(ulong, ulong, uint, out uint, XrSpatialCapabilityEXT*)
Enumerates the spatial capabilities that are supported by the given OpenXR instance and system ID.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrEnumerateSpatialCapabilitiesEXT(ulong instance, ulong systemId, uint capabilityCountInput, out uint capabilityCountOutput, XrSpatialCapabilityEXT* capabilities)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The ID of the system whose spatial capabilities will be enumerated. |
| uint | capabilityCountInput | The capacity of |
| uint | capabilityCountOutput | The count of elements in |
| XrSpatialCapabilityEXT* | capabilities | Pointer to an array of capabilities. Can be null if
|
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrEnumerateSpatialCapabilitiesEXT(ulong, ulong, Allocator, out NativeArray<XrSpatialCapabilityEXT>)
Enumerates the spatial capabilities that are supported by the given OpenXR instance and system ID.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrEnumerateSpatialCapabilitiesEXT(ulong instance, ulong systemId, Allocator allocator, out NativeArray<XrSpatialCapabilityEXT> capabilities)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The ID of the system whose spatial capabilities will be enumerated. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialCapabilityEXT> | capabilities | The array of capabilities. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrEnumerateSpatialCapabilitiesEXT(Allocator, out NativeArray<XrSpatialCapabilityEXT>)
Enumerates the spatial capabilities that are supported by the current system.
Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrEnumerateSpatialCapabilitiesEXT(Allocator allocator, out NativeArray<XrSpatialCapabilityEXT> capabilities)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialCapabilityEXT> | capabilities | The array of capabilities. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrEnumerateSpatialCapabilityComponentTypesEXT(ulong, ulong, XrSpatialCapabilityEXT, Allocator, out NativeArray<XrSpatialComponentTypeEXT>)
Enumerates the component types that the given capability provides on its entities for the given system.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrEnumerateSpatialCapabilityComponentTypesEXT(ulong instance, ulong systemId, XrSpatialCapabilityEXT capability, Allocator allocator, out NativeArray<XrSpatialComponentTypeEXT> componentTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The system whose spatial capability components will be enumerated. |
| XrSpatialCapabilityEXT | capability | The capability for which the components will be enumerated. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialComponentTypeEXT> | componentTypes | The component types that |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrEnumerateSpatialCapabilityComponentTypesEXT(ulong, ulong, XrSpatialCapabilityEXT, ref XrSpatialCapabilityComponentTypesEXT)
Enumerates the component types that a given capability provides on its entities for the given system.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrEnumerateSpatialCapabilityComponentTypesEXT(ulong instance, ulong systemId, XrSpatialCapabilityEXT capability, ref XrSpatialCapabilityComponentTypesEXT capabilityComponents)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The system whose spatial capability components will be enumerated. |
| XrSpatialCapabilityEXT | capability | The capability for which the components will be enumerated. |
| XrSpatialCapabilityComponentTypesEXT | capabilityComponents | The component types that |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
xrEnumerateSpatialCapabilityComponentTypesEXT(XrSpatialCapabilityEXT, Allocator, out NativeArray<XrSpatialComponentTypeEXT>)
Enumerates the component types that the given capability provides on its entities for the current system.
Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrEnumerateSpatialCapabilityComponentTypesEXT(XrSpatialCapabilityEXT capability, Allocator allocator, out NativeArray<XrSpatialComponentTypeEXT> componentTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialCapabilityEXT | capability | The capability for which the components will be enumerated. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialComponentTypeEXT> | componentTypes | The component types that |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrEnumerateSpatialCapabilityComponentTypesEXT(XrSpatialCapabilityEXT, ref XrSpatialCapabilityComponentTypesEXT)
Enumerates the component types that the given capability provides on its entities for the current system.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern OpenXRResultStatus xrEnumerateSpatialCapabilityComponentTypesEXT(XrSpatialCapabilityEXT capability, ref XrSpatialCapabilityComponentTypesEXT capabilityComponents)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialCapabilityEXT | capability | The capability for which the components will be enumerated. |
| XrSpatialCapabilityComponentTypesEXT | capabilityComponents | The component types that |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
xrEnumerateSpatialCapabilityFeaturesEXT(ulong, ulong, XrSpatialCapabilityEXT, uint, out uint, XrSpatialCapabilityFeatureEXT*)
Enumerates the configurable features that the given capability supports for the given system.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrEnumerateSpatialCapabilityFeaturesEXT(ulong instance, ulong systemId, XrSpatialCapabilityEXT capability, uint capabilityFeatureCapacityInput, out uint capabilityFeatureCountOutput, XrSpatialCapabilityFeatureEXT* capabilityFeatures)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The system for which the features will be enumerated. |
| XrSpatialCapabilityEXT | capability | The capability for which the features will be enumerated. |
| uint | capabilityFeatureCapacityInput | The capacity of |
| uint | capabilityFeatureCountOutput | The count of elements in |
| XrSpatialCapabilityFeatureEXT* | capabilityFeatures | Pointer to an array of features. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrEnumerateSpatialCapabilityFeaturesEXT(ulong, ulong, XrSpatialCapabilityEXT, Allocator, out NativeArray<XrSpatialCapabilityFeatureEXT>)
Enumerates the configurable features that the given capability supports for the given system.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrEnumerateSpatialCapabilityFeaturesEXT(ulong instance, ulong systemId, XrSpatialCapabilityEXT capability, Allocator allocator, out NativeArray<XrSpatialCapabilityFeatureEXT> capabilityFeatures)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The system for which the features will be enumerated. |
| XrSpatialCapabilityEXT | capability | The capability for which the features will be enumerated. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialCapabilityFeatureEXT> | capabilityFeatures | The output array of features. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrEnumerateSpatialCapabilityFeaturesEXT(XrSpatialCapabilityEXT, uint, out uint, XrSpatialCapabilityFeatureEXT*)
Enumerates the configurable features that the given capability supports for the current system.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern OpenXRResultStatus xrEnumerateSpatialCapabilityFeaturesEXT(XrSpatialCapabilityEXT capability, uint capabilityFeatureCapacityInput, out uint capabilityFeatureCountOutput, XrSpatialCapabilityFeatureEXT* capabilityFeatures)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialCapabilityEXT | capability | The capability for which the features will be enumerated. |
| uint | capabilityFeatureCapacityInput | The capacity of |
| uint | capabilityFeatureCountOutput | The count of elements in |
| XrSpatialCapabilityFeatureEXT* | capabilityFeatures | Pointer to an array of features. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrEnumerateSpatialCapabilityFeaturesEXT(XrSpatialCapabilityEXT, Allocator, out NativeArray<XrSpatialCapabilityFeatureEXT>)
Enumerates the configurable features that the given capability supports for the current system.
Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrEnumerateSpatialCapabilityFeaturesEXT(XrSpatialCapabilityEXT capability, Allocator allocator, out NativeArray<XrSpatialCapabilityFeatureEXT> capabilityFeatures)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialCapabilityEXT | capability | The capability for which the features will be enumerated. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialCapabilityFeatureEXT> | capabilityFeatures | The output array of features. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrEnumerateSpatialPersistenceScopesEXT(uint, out uint, XrSpatialPersistenceScopeEXT*)
Enumerates the types of persistence scopes that are supported by the current OpenXR instance and system ID.
Declaration
public static extern OpenXRResultStatus xrEnumerateSpatialPersistenceScopesEXT(uint persistenceScopeCapacityInput, out uint persistenceScopeCountOutput, XrSpatialPersistenceScopeEXT* persistenceScopes)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | persistenceScopeCapacityInput | The capacity of |
| uint | persistenceScopeCountOutput | The number of persistence scopes, or the required capacity if
|
| XrSpatialPersistenceScopeEXT* | persistenceScopes | Pointer to an array of persistence scopes. Can be |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrEnumerateSpatialPersistenceScopesEXT(ulong, ulong, uint, out uint, XrSpatialPersistenceScopeEXT*)
Enumerates the types of persistence scopes that are supported by the given OpenXR instance and system ID.
Declaration
public static extern XrResult xrEnumerateSpatialPersistenceScopesEXT(ulong instance, ulong systemId, uint persistenceScopeCapacityInput, out uint persistenceScopeCountOutput, XrSpatialPersistenceScopeEXT* persistenceScopes)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The ID of the system whose persistence scopes will be enumerated. |
| uint | persistenceScopeCapacityInput | The capacity of |
| uint | persistenceScopeCountOutput | The number of persistence scopes, or the required capacity if
|
| XrSpatialPersistenceScopeEXT* | persistenceScopes | Pointer to an array of persistence scopes. Can be |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrEnumerateSpatialPersistenceScopesEXT(ulong, ulong, Allocator, out NativeArray<XrSpatialPersistenceScopeEXT>)
Enumerates the types of persistence scopes that are supported by the given OpenXR instance and system ID.
Declaration
public static XrResult xrEnumerateSpatialPersistenceScopesEXT(ulong instance, ulong systemId, Allocator allocator, out NativeArray<XrSpatialPersistenceScopeEXT> persistenceScopes)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance. |
| ulong | systemId | The ID of the system whose persistence scopes will be enumerated. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialPersistenceScopeEXT> | persistenceScopes | Output native array of persistence scopes. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
xrEnumerateSpatialPersistenceScopesEXT(Allocator, out NativeArray<XrSpatialPersistenceScopeEXT>)
Enumerates the types of persistence scopes that are supported by the current OpenXR instance and system ID.
Declaration
public static OpenXRResultStatus xrEnumerateSpatialPersistenceScopesEXT(Allocator allocator, out NativeArray<XrSpatialPersistenceScopeEXT> persistenceScopes)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrSpatialPersistenceScopeEXT> | persistenceScopes | Output native array of persistence scopes. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
xrGetSpatialBufferFloatEXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, float*)
Gets the contents of a buffer of type Float.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferFloatEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, float* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The count of elements in |
| float* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferFloatEXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<float>)
Gets the contents of a buffer of type Float.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferFloatEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<float> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<float> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrGetSpatialBufferStringEXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, byte*)
Gets the contents of a buffer of type String.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferStringEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, byte* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The number of UTF-8 |
| byte* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferStringEXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<byte>)
Gets the contents of a buffer of type String
as a native array of bytes, allowing you to read the string and then dispose the array when you no longer
need the string in memory. Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferStringEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<byte> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
To read the output as a string, use the following example code:
var result = xrGetSpatialBufferStringEXT(snapshot, info, allocator, out var buffer);
if (result.IsError()) return;
var myString = Encoding.UTF8.GetString(buffer.AsReadOnlySpan());
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrGetSpatialBufferUint16EXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, ushort*)
Gets the contents of a buffer of type Uint16.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferUint16EXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, ushort* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The count of elements in |
| ushort* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferUint16EXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<ushort>)
Gets the contents of a buffer of type Uint16.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferUint16EXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<ushort> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<ushort> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrGetSpatialBufferUint32EXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, uint*)
Gets the contents of a buffer of type Uint32.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferUint32EXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, uint* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The count of elements in |
| uint* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferUint32EXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<uint>)
Gets the contents of a buffer of type Uint32.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferUint32EXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<uint> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<uint> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrGetSpatialBufferUint8EXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, byte*)
Gets the contents of a buffer of type Uint8.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferUint8EXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, byte* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The count of elements in |
| byte* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferUint8EXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<byte>)
Gets the contents of a buffer of type Uint8.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferUint8EXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<byte> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrGetSpatialBufferVector2fEXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, XrVector2f*)
Gets the contents of a buffer of type Vector2f.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferVector2fEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, XrVector2f* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The count of elements in |
| XrVector2f* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferVector2fEXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<XrVector2f>)
Gets the contents of a buffer of type Vector2f.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferVector2fEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<XrVector2f> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrVector2f> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrGetSpatialBufferVector3fEXT(ulong, in XrSpatialBufferGetInfoEXT, uint, out uint, XrVector3f*)
Gets the contents of a buffer of type Vector3f.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrGetSpatialBufferVector3fEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, uint bufferCapacityInput, out uint bufferCountOutput, XrVector3f* buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| uint | bufferCapacityInput | The capacity of |
| uint | bufferCountOutput | The count of elements in |
| XrVector3f* | buffer | Pointer to an array of |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrGetSpatialBufferVector3fEXT(ulong, in XrSpatialBufferGetInfoEXT, Allocator, out NativeArray<XrVector3f>)
Gets the contents of a buffer of type Vector3f.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferVector3fEXT(ulong snapshot, in XrSpatialBufferGetInfoEXT info, Allocator allocator, out NativeArray<XrVector3f> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| XrSpatialBufferGetInfoEXT | info | The information regarding the buffer to query. |
| Allocator | allocator | The allocation strategy to use for |
| NativeArray<XrVector3f> | buffer | The output array. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
You are responsible to Dispose the output native array if you pass Allocator.Persistent as the
allocator value.
Exceptions
| Type | Condition |
|---|---|
| OverflowException | Thrown if |
xrPersistSpatialEntityAsyncEXT(ulong, in XrSpatialEntityPersistInfoEXT, out ulong)
Persists the spatial entity defined in persistInfo to the given persistence context.
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static extern XrResult xrPersistSpatialEntityAsyncEXT(ulong persistenceContext, in XrSpatialEntityPersistInfoEXT persistInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | persistenceContext | A persistence context previously created using
|
| XrSpatialEntityPersistInfoEXT | persistInfo | The persist info struct. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrPersistSpatialEntityCompleteEXT(ulong, ulong, out XrPersistSpatialEntityCompletionEXT)
Completes the asynchronous operation started by xrPersistSpatialEntityAsyncEXT(ulong, in XrSpatialEntityPersistInfoEXT, out ulong).
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static XrResult xrPersistSpatialEntityCompleteEXT(ulong persistenceContext, ulong future, out XrPersistSpatialEntityCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | persistenceContext | The persistence context previously passed to
|
| ulong | future | The future previously received from |
| XrPersistSpatialEntityCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrPollFutureEXT(ulong, in XrFuturePollInfoEXT, out XrFuturePollResultEXT)
Poll the state of a future scoped to the given OpenXR instance. Provided by XR_EXT_future.
Declaration
public static XrResult xrPollFutureEXT(ulong instance, in XrFuturePollInfoEXT pollInfo, out XrFuturePollResultEXT pollResult)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | The OpenXR instance for which the future in |
| XrFuturePollInfoEXT | pollInfo | The poll info. |
| XrFuturePollResultEXT | pollResult | The output result struct. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
pollResult.state is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrPollFutureEXT(ulong, out XrFuturePollResultEXT)
Poll the state of a future scoped to the current OpenXR instance. Provided by XR_EXT_future.
This convenience overload creates an XrFuturePollInfoEXT on your behalf using the given future.
Declaration
public static OpenXRResultStatus xrPollFutureEXT(ulong future, out XrFuturePollResultEXT pollResult)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | future | The future. |
| XrFuturePollResultEXT | pollResult | The output result struct. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
pollResult.state is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrPollFutureEXT(in XrFuturePollInfoEXT, out XrFuturePollResultEXT)
Poll the state of a future scoped to the current OpenXR instance. Provided by XR_EXT_future.
Declaration
public static OpenXRResultStatus xrPollFutureEXT(in XrFuturePollInfoEXT pollInfo, out XrFuturePollResultEXT pollResult)
Parameters
| Type | Name | Description |
|---|---|---|
| XrFuturePollInfoEXT | pollInfo | The poll info. |
| XrFuturePollResultEXT | pollResult | The output result struct. |
Returns
| Type | Description |
|---|---|
| OpenXRResultStatus | The result of the operation. nativeStatusCode failure codes:
|
Remarks
Important
pollResult.state is only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrQuerySpatialComponentDataEXT(ulong, in XrSpatialComponentDataQueryConditionEXT, ref XrSpatialComponentDataQueryResultEXT)
Queries the component data of the entities in a given snapshot based on the query condition.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrQuerySpatialComponentDataEXT(ulong snapshot, in XrSpatialComponentDataQueryConditionEXT queryCondition, ref XrSpatialComponentDataQueryResultEXT queryResult)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | A spatial snapshot previously created by
|
| XrSpatialComponentDataQueryConditionEXT | queryCondition | The query condition. |
| XrSpatialComponentDataQueryResultEXT | queryResult | The query result. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
xrUnpersistSpatialEntityAsyncEXT(ulong, in XrSpatialEntityUnpersistInfoEXT, out ulong)
Unpersists the spatial entity defined in unpersistInfo from the given persistence
context.
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static extern XrResult xrUnpersistSpatialEntityAsyncEXT(ulong persistenceContext, in XrSpatialEntityUnpersistInfoEXT unpersistInfo, out ulong future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | persistenceContext | A persistence context previously created using
|
| XrSpatialEntityUnpersistInfoEXT | unpersistInfo | The unpersist info struct. |
| ulong | future | The output future. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.
xrUnpersistSpatialEntityCompleteEXT(ulong, ulong, out XrUnpersistSpatialEntityCompletionEXT)
Completes the asynchronous operation started by xrUnpersistSpatialEntityAsyncEXT(ulong, in XrSpatialEntityUnpersistInfoEXT, out ulong).
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static XrResult xrUnpersistSpatialEntityCompleteEXT(ulong persistenceContext, ulong future, out XrUnpersistSpatialEntityCompletionEXT completion)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | persistenceContext | The persistence context previously passed to
|
| ulong | future | The future previously received from |
| XrUnpersistSpatialEntityCompletionEXT | completion | The output completion struct. |
Returns
| Type | Description |
|---|---|
| XrResult | The result of the operation. |
Remarks
Important
Output parameters are only valid if the returned result .IsSuccess().
Don't read the output if an error is returned.