Class OpenXRNativeApi
OpenXR native API.
For more information, refer to OpenXR native API in the user manual.
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public static class OpenXRNativeApi
Methods
xrCancelFutureEXT(UInt64)
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(UInt64 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(UInt64, 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(UInt64 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(UInt64, in XrPosef, out UInt64, out UInt64)
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(UInt64 spatialContext, in XrPosef pose, out UInt64 anchorEntityId, out UInt64 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(UInt64, in XrSpatialAnchorCreateInfoEXT, out UInt64, out UInt64)
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(UInt64 spatialContext, in XrSpatialAnchorCreateInfoEXT createInfo, out UInt64 anchorEntityId, out UInt64 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.
xrCreateSpatialAnchorEXT(UInt64, Vector3, Quaternion, out UInt64, out UInt64)
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(UInt64 spatialContext, Vector3 position, Quaternion rotation, out UInt64 anchorEntityId, out UInt64 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.
xrCreateSpatialContextAsyncEXT(UInt64, in XrSpatialContextCreateInfoEXT, out UInt64)
Creates a spatial context scoped to the given session. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialContextAsyncEXT(UInt64 session, in XrSpatialContextCreateInfoEXT createInfo, out UInt64 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 UInt64)
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 UInt64 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(UInt64, UInt64, out XrCreateSpatialContextCompletionEXT)
Completes the asynchronous operation started by OpenXRNativeAPI.xrCreateSpatialContextAsyncEXT.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrCreateSpatialContextCompleteEXT(UInt64 session, UInt64 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(UInt64, out XrCreateSpatialContextCompletionEXT)
Completes the asynchronous operation started by OpenXRNativeAPI.xrCreateSpatialContextAsyncEXT.
Provided by XR_EXT_spatial_entity.
Declaration
public static OpenXRResultStatus xrCreateSpatialContextCompleteEXT(UInt64 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(UInt64, in XrSpatialDiscoverySnapshotCreateInfoEXT, out UInt64)
Creates a discovery snapshot for the given spatial context. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialDiscoverySnapshotAsyncEXT(UInt64 spatialContext, in XrSpatialDiscoverySnapshotCreateInfoEXT createInfo, out UInt64 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(UInt64, UInt64, 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(UInt64 spatialContext, UInt64 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(UInt64, in XrCreateSpatialDiscoverySnapshotCompletionInfoEXT, out XrCreateSpatialDiscoverySnapshotCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialDiscoverySnapshotAsyncEXT.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrCreateSpatialDiscoverySnapshotCompleteEXT(UInt64 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(UInt64, UInt64, out UInt64)
Creates a spatial entity handle from the given spatial entity ID. Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrCreateSpatialEntityFromIdEXT(UInt64 spatialContext, UInt64 entityId, out UInt64 spatialEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A valid spatial context. |
| ulong | entityId | The entity ID. |
| 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.
xrCreateSpatialEntityFromIdEXT(UInt64, in XrSpatialEntityFromIdCreateInfoEXT, out UInt64)
Creates a spatial entity handle from the given spatial entity ID. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrCreateSpatialEntityFromIdEXT(UInt64 spatialContext, in XrSpatialEntityFromIdCreateInfoEXT createInfo, out UInt64 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(UInt64, in XrSpatialPersistenceContextCreateInfoEXT, out UInt64)
Creates persistence context scoped to the given session.
Declaration
public static extern XrResult xrCreateSpatialPersistenceContextAsyncEXT(UInt64 session, in XrSpatialPersistenceContextCreateInfoEXT createInfo, out UInt64 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 UInt64)
Creates a persistence context scoped to the current session.
Declaration
public static extern OpenXRResultStatus xrCreateSpatialPersistenceContextAsyncEXT(in XrSpatialPersistenceContextCreateInfoEXT createInfo, out UInt64 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.
xrCreateSpatialPersistenceContextAsyncEXT(XrSpatialPersistenceScopeEXT, out UInt64)
Creates a persistence context scoped to the current session.
Declaration
public static OpenXRResultStatus xrCreateSpatialPersistenceContextAsyncEXT(XrSpatialPersistenceScopeEXT persistenceScope, out UInt64 future)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialPersistenceScopeEXT | persistenceScope | The scope to use for the persistence context. |
| 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(UInt64, UInt64, out XrCreateSpatialPersistenceContextCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialPersistenceContextAsyncEXT(UInt64, in XrSpatialPersistenceContextCreateInfoEXT, out UInt64).
Provided by XR_EXT_spatial_persistence.
Declaration
public static XrResult xrCreateSpatialPersistenceContextCompleteEXT(UInt64 session, UInt64 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(UInt64, out XrCreateSpatialPersistenceContextCompletionEXT)
Completes the asynchronous operation started by
xrCreateSpatialPersistenceContextAsyncEXT(in XrSpatialPersistenceContextCreateInfoEXT, out UInt64).
Provided by XR_EXT_spatial_persistence.
Declaration
public static OpenXRResultStatus xrCreateSpatialPersistenceContextCompleteEXT(UInt64 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(UInt64, NativeArray<UInt64>, NativeArray<XrSpatialComponentTypeEXT>, out UInt64)
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(UInt64 spatialContext, NativeArray<UInt64> entities, NativeArray<XrSpatialComponentTypeEXT> componentTypes, out UInt64 snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using an overload of
|
| NativeArray<UInt64> | 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(UInt64).
See Also
xrCreateSpatialUpdateSnapshotEXT(UInt64, uint, UInt64*, uint, XrSpatialComponentTypeEXT*, out UInt64)
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(UInt64 spatialContext, uint entityCount, UInt64* entities, uint componentTypeCount, XrSpatialComponentTypeEXT* componentTypes, out UInt64 snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | spatialContext | A spatial context previously created using an overload of
|
| uint | entityCount | The count of elements in |
| UInt64* | 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(UInt64).
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(UInt64).
See Also
xrCreateSpatialUpdateSnapshotEXT(UInt64, in XrSpatialUpdateSnapshotCreateInfoEXT, out UInt64)
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(UInt64 spatialContext, in XrSpatialUpdateSnapshotCreateInfoEXT createInfo, out UInt64 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(UInt64)
Destroys the given spatial context. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrDestroySpatialContextEXT(UInt64 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(UInt64)
Destroys the given spatial entity handle. Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrDestroySpatialEntityEXT(UInt64 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(UInt64)
Releases the given persistence context handle. Provided by XR_EXT_spatial_persistence.
Declaration
public static extern XrResult xrDestroySpatialPersistenceContextEXT(UInt64 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(UInt64)
Destroys the given spatial snapshot handle and the resources associated with it.
Provided by XR_EXT_spatial_entity.
Declaration
public static extern XrResult xrDestroySpatialSnapshotEXT(UInt64 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(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.
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(UInt64, UInt64, 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(UInt64 instance, UInt64 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.
xrEnumerateSpatialCapabilitiesEXT(UInt64, UInt64, 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(UInt64 instance, UInt64 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(UInt64, UInt64, 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(UInt64 instance, UInt64 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.
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(UInt64, UInt64, 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(UInt64 instance, UInt64 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.
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(UInt64, UInt64, 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(UInt64 instance, UInt64 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.
xrEnumerateSpatialCapabilityFeaturesEXT(UInt64, UInt64, 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(UInt64 instance, UInt64 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, 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.
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(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.
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(UInt64, UInt64, 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(UInt64 instance, UInt64 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(UInt64, UInt64, 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(UInt64 instance, UInt64 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(UInt64, UInt64, Allocator, out NativeArray<float>)
Gets the contents of a buffer of type Float.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferFloatEXT(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<float> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferFloatEXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<float> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferFloatEXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferFloatEXT(UInt64, 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(UInt64 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(UInt64, UInt64, 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(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferStringEXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferStringEXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferStringEXT(UInt64, 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(UInt64 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(UInt64, UInt64, Allocator, out NativeArray<ushort>)
Gets the contents of a buffer of type Uint16.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferUint16EXT(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<ushort> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferUint16EXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<ushort> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferUint16EXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferUint16EXT(UInt64, 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(UInt64 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(UInt64, UInt64, Allocator, out NativeArray<uint>)
Gets the contents of a buffer of type Uint32.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferUint32EXT(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<uint> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferUint32EXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<uint> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferUint32EXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferUint32EXT(UInt64, 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(UInt64 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(UInt64, UInt64, Allocator, out NativeArray<byte>)
Gets the contents of a buffer of type Uint8.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferUint8EXT(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferUint8EXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferUint8EXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferUint8EXT(UInt64, 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(UInt64 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(UInt64, UInt64, Allocator, out NativeArray<XrVector2f>)
Gets the contents of a buffer of type Vector2f.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferVector2fEXT(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<XrVector2f> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferVector2fEXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<XrVector2f> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferVector2fEXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferVector2fEXT(UInt64, 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(UInt64 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(UInt64, UInt64, Allocator, out NativeArray<XrVector3f>)
Gets the contents of a buffer of type Vector3f.
Provided by XR_EXT_spatial_entity.
Declaration
public static XrResult xrGetSpatialBufferVector3fEXT(UInt64 snapshot, UInt64 bufferId, Allocator allocator, out NativeArray<XrVector3f> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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.
xrGetSpatialBufferVector3fEXT(ulong, ulong, 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, ulong bufferId, Allocator allocator, out NativeArray<XrVector3f> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | snapshot | The handle to a spatial snapshot. |
| ulong | bufferId | The buffer ID 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 |
xrGetSpatialBufferVector3fEXT(UInt64, 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(UInt64 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.
xrGetSpatialBufferVector3fEXT(UInt64, 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(UInt64 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(UInt64, in XrSpatialEntityPersistInfoEXT, out UInt64)
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(UInt64 persistenceContext, in XrSpatialEntityPersistInfoEXT persistInfo, out UInt64 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(UInt64, UInt64, out XrPersistSpatialEntityCompletionEXT)
Completes the asynchronous operation started by xrPersistSpatialEntityAsyncEXT(UInt64, in XrSpatialEntityPersistInfoEXT, out UInt64).
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static XrResult xrPersistSpatialEntityCompleteEXT(UInt64 persistenceContext, UInt64 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(UInt64, 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(UInt64 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(UInt64, 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(UInt64 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(UInt64, 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(UInt64 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(UInt64, in XrSpatialEntityUnpersistInfoEXT, out UInt64)
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(UInt64 persistenceContext, in XrSpatialEntityUnpersistInfoEXT unpersistInfo, out UInt64 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.
xrUnpersistSpatialEntityAsyncEXT(UInt64, XrUuid, out UInt64)
Unpersists the spatial entity defined by the given UUID from the given persistence context.
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static XrResult xrUnpersistSpatialEntityAsyncEXT(UInt64 persistenceContext, XrUuid persistUuid, out UInt64 future)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | persistenceContext | A persistence context previously created using
|
| XrUuid | persistUuid | The UUID of the persisted entity to unpersist. |
| 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(UInt64, UInt64, out XrUnpersistSpatialEntityCompletionEXT)
Completes the asynchronous operation started by xrUnpersistSpatialEntityAsyncEXT(UInt64, in XrSpatialEntityUnpersistInfoEXT, out UInt64).
Provided by XR_EXT_spatial_persistence_operations.
Declaration
public static XrResult xrUnpersistSpatialEntityCompleteEXT(UInt64 persistenceContext, UInt64 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.