Class XROcclusionSubsystem.Provider
The provider which will service the XROcclusionSubsystem.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class Provider
Properties
currentHumanDepthMode
Property to be implemented by the provider to get the human segmentation depth mode currently in use.
Declaration
public virtual HumanSegmentationDepthMode currentHumanDepthMode { get; }
Property Value
Type | Description |
---|---|
HumanSegmentationDepthMode |
currentHumanStencilMode
Property to be implemented by the provider to get the segmentation stencil mode currently in use.
Declaration
public virtual HumanSegmentationStencilMode currentHumanStencilMode { get; }
Property Value
Type | Description |
---|---|
HumanSegmentationStencilMode |
humanDepthCpuImageApi
The XRCpuImage.Api for interacting with an XRCpuImage acquired with TryAcquireHumanDepthCpuImage(out XRCpuImage.Cinfo).
Declaration
public virtual XRCpuImage.Api humanDepthCpuImageApi { get; }
Property Value
Type | Description |
---|---|
XRCpuImage.Api |
humanStencilCpuImageApi
The XRCpuImage.Api for interacting with an XRCpuImage acquired with TryAcquireHumanStencilCpuImage(out XRCpuImage.Cinfo).
Declaration
public virtual XRCpuImage.Api humanStencilCpuImageApi { get; }
Property Value
Type | Description |
---|---|
XRCpuImage.Api |
requestedHumanDepthMode
Property to be implemented by the provider to get/set the requested human segmentation depth mode.
Declaration
public virtual HumanSegmentationDepthMode requestedHumanDepthMode { get; set; }
Property Value
Type | Description |
---|---|
HumanSegmentationDepthMode | The requested human segmentation depth mode. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when setting the human segmentation depth mode to enabled if the implementation does not support human segmentation. |
requestedHumanStencilMode
Property to be implemented by the provider to get/set the requested human segmentation stencil mode.
Declaration
public virtual HumanSegmentationStencilMode requestedHumanStencilMode { get; set; }
Property Value
Type | Description |
---|---|
HumanSegmentationStencilMode | The requested human segmentation stencil mode. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when setting the human segmentation stencil mode to enabled if the implementation does not support human segmentation. |
Methods
Destroy()
Method to be implemented by the provider to destroy itself and release any resources.
Declaration
public virtual void Destroy()
GetMaterialKeywords(out List<String>, out List<String>)
Method to be implemented by the provider to get the enabled and disabled shader keywords for the material.
Declaration
public virtual void GetMaterialKeywords(out List<string> enabledKeywords, out List<string> disabledKeywords)
Parameters
Type | Name | Description |
---|---|---|
List<String> | enabledKeywords | The keywords to enable for the material. |
List<String> | disabledKeywords | The keywords to disable for the material. |
GetTextureDescriptors(XRTextureDescriptor, Allocator)
Method to be implemented by the provider to get the occlusion texture descriptors associated with the current AR frame.
Declaration
public virtual NativeArray<XRTextureDescriptor> GetTextureDescriptors(XRTextureDescriptor defaultDescriptor, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
XRTextureDescriptor | defaultDescriptor | The default descriptor value. |
Allocator | allocator | The allocator to use when creating the returned |
Returns
Type | Description |
---|---|
NativeArray<XRTextureDescriptor> | An array of the occlusion texture descriptors. |
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()
TryAcquireHumanDepthCpuImage(out XRCpuImage.Cinfo)
Tries to acquire the latest human depth CPU image.
Declaration
public virtual bool TryAcquireHumanDepthCpuImage(out XRCpuImage.Cinfo cinfo)
Parameters
Type | Name | Description |
---|---|---|
XRCpuImage.Cinfo | cinfo | If this method returns |
Returns
Type | Description |
---|---|
Boolean | Returns |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if the implementation does not support human depth CPU images. |
TryAcquireHumanStencilCpuImage(out XRCpuImage.Cinfo)
Tries to acquire the latest human stencil CPU image.
Declaration
public virtual bool TryAcquireHumanStencilCpuImage(out XRCpuImage.Cinfo cinfo)
Parameters
Type | Name | Description |
---|---|---|
XRCpuImage.Cinfo | cinfo | If this method returns |
Returns
Type | Description |
---|---|
Boolean | Returns |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if the implementation does not support human stencil CPU images. |
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 get 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. |