Class XRHumanBodySubsystem.IProvider
Namespace: UnityEngine.XR.ARSubsystems
Syntax
protected abstract class IProvider
Methods
Destroy()
Method to be implemented by the provider to destroy itself and release any resources.
Declaration
public virtual void Destroy()
GetChanges(XRHumanBody, Allocator)
Method to be implemented by the provider to query for the set of human body changes.
Declaration
public virtual TrackableChanges<XRHumanBody> GetChanges(XRHumanBody defaultHumanBody, Allocator allocator)
Parameters
| Type | Name | Description | 
|---|---|---|
| XRHumanBody | defaultHumanBody | The default human body.  | 
| Allocator | allocator | The memory allocator to use for the returns trackable changes.  | 
Returns
| Type | Description | 
|---|---|
| TrackableChanges<XRHumanBody> | The set of human body changes.  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown for platforms not supporting human body pose estimation.  | 
GetHumanBodyPose2DJoints(XRHumanBodyPose2DJoint, ScreenOrientation, Allocator)
Method to be implemented by the provider to get the human body pose 2D joints for the current frame.
Declaration
public virtual NativeArray<XRHumanBodyPose2DJoint> GetHumanBodyPose2DJoints(XRHumanBodyPose2DJoint defaultHumanBodyPose2DJoint, ScreenOrientation screenOrientation, Allocator allocator)
Parameters
| Type | Name | Description | 
|---|---|---|
| XRHumanBodyPose2DJoint | defaultHumanBodyPose2DJoint | |
| ScreenOrientation | screenOrientation | The orientation of the device so that the joint positions may be adjusted as required.  | 
| Allocator | allocator | The allocator to use for the returned array memory.  | 
Returns
| Type | Description | 
|---|---|
| NativeArray<XRHumanBodyPose2DJoint> | The array of body pose 2D joints.  | 
Remarks
The returned array may be empty if the system is not enabled for human body pose 2D or if the system does not detect a human in the camera image.
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown if the implementation does not support human body pose 2D.  | 
GetSkeleton(TrackableId, Allocator, ref NativeArray<XRHumanBodyJoint>)
Method to be implemented by the provider to get the skeleton joints for the requested trackable identifier.
Declaration
public virtual void GetSkeleton(TrackableId trackableId, Allocator allocator, ref NativeArray<XRHumanBodyJoint> skeleton)
Parameters
| Type | Name | Description | 
|---|---|---|
| TrackableId | trackableId | The human body trackable identifier for which to query.  | 
| Allocator | allocator | The memory allocator to use for the returned arrays.  | 
| NativeArray<XRHumanBodyJoint> | skeleton | The array of skeleton joints to update and returns.  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown for platforms not supporting human body pose estimation.  | 
Start()
Method to be implemented by the provider to start the functionality.
Declaration
public virtual void Start()
Stop()
Method to be implemented by the provider to stop the functionality.
Declaration
public virtual void Stop()
TryGetHumanDepth(out XRTextureDescriptor)
Method to be implemented by the provider to get the human depth texture descriptor.
Declaration
public virtual bool TryGetHumanDepth(out XRTextureDescriptor humanDepthDescriptor)
Parameters
| Type | Name | Description | 
|---|---|---|
| XRTextureDescriptor | humanDepthDescriptor | The human depth texture descriptor to be populated, if available  | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown if the implementation does not support human depth texture.  | 
TryGetHumanStencil(out XRTextureDescriptor)
Method to be implemented by the provider to gets the human stencil texture descriptor.
Declaration
public virtual bool TryGetHumanStencil(out XRTextureDescriptor humanStencilDescriptor)
Parameters
| Type | Name | Description | 
|---|---|---|
| XRTextureDescriptor | humanStencilDescriptor | The human stencil texture descriptor to be populated, if available.  | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown if the implementation does not support human stencil texture.  | 
TrySetHumanBodyPose2DEstimationEnabled(Boolean)
Declaration
public virtual bool TrySetHumanBodyPose2DEstimationEnabled(bool enabled)
Parameters
| Type | Name | Description | 
|---|---|---|
| Boolean | enabled | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
TrySetHumanBodyPose3DEstimationEnabled(Boolean)
Method to be implemented by the provider to sets whether human body pose 3D estimation is enabled.
Declaration
public virtual bool TrySetHumanBodyPose3DEstimationEnabled(bool enabled)
Parameters
| Type | Name | Description | 
|---|---|---|
| Boolean | enabled | Whether the human body pose 3D estimation should be enabled.  | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown when setting the human body pose 3D estimation to
  | 
TrySetHumanBodyPose3DScaleEstimationEnabled(Boolean)
Method to be implemented by the provider to sets whether 3D human body scale estimation is enabled.
Declaration
public virtual bool TrySetHumanBodyPose3DScaleEstimationEnabled(bool enabled)
Parameters
| Type | Name | Description | 
|---|---|---|
| Boolean | enabled | Whether the 3D human body scale estimation should be enabled.  | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown when setting the 3D human body scale estimation to
  | 
TrySetHumanSegmentationDepthMode(HumanSegmentationMode)
Method to be implemented by the provider to set the human segmentation depth mode.
Declaration
public virtual bool TrySetHumanSegmentationDepthMode(HumanSegmentationMode humanSegmentationDepthMode)
Parameters
| Type | Name | Description | 
|---|---|---|
| HumanSegmentationMode | humanSegmentationDepthMode | The mode for the human segmentation depth.  | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown when setting the human segmentation depth mode to enabled if the implementation does not support human segmentation.  | 
TrySetHumanSegmentationStencilMode(HumanSegmentationMode)
Method to be implemented by the provider to set the human segmentation stencil mode.
Declaration
public virtual bool TrySetHumanSegmentationStencilMode(HumanSegmentationMode humanSegmentationStencilMode)
Parameters
| Type | Name | Description | 
|---|---|---|
| HumanSegmentationMode | humanSegmentationStencilMode | The mode for the human segmentation stencil.  | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
  | 
Exceptions
| Type | Condition | 
|---|---|
| NotSupportedException | Thrown when setting the human segmentation stencil mode to enabled if the implementation does not support human segmentation.  |