Class XROcclusionSubsystem.Provider
The provider which will service the XROcclusionSubsystem.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class Provider : SubsystemProvider<XROcclusionSubsystem>
Properties
currentEnvironmentDepthMode
Property to be implemented by the provider to get the environment depth mode currently in use.
Declaration
public virtual EnvironmentDepthMode currentEnvironmentDepthMode { get; }
Property Value
Type | Description |
---|---|
EnvironmentDepthMode |
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 |
currentOcclusionPreferenceMode
Get the occlusion preference mode currently in use by the provider.
Declaration
public virtual OcclusionPreferenceMode currentOcclusionPreferenceMode { get; }
Property Value
Type | Description |
---|---|
OcclusionPreferenceMode |
environmentDepthConfidenceCpuImageApi
The XRCpuImage.Api for interacting with an XRCpuImage acquired with TryAcquireEnvironmentDepthConfidenceCpuImage(out XRCpuImage.Cinfo).
Declaration
public virtual XRCpuImage.Api environmentDepthConfidenceCpuImageApi { get; }
Property Value
Type | Description |
---|---|
XRCpuImage.Api |
environmentDepthCpuImageApi
The XRCpuImage.Api for interacting with an XRCpuImage acquired with TryAcquireEnvironmentDepthCpuImage(out XRCpuImage.Cinfo).
Declaration
public virtual XRCpuImage.Api environmentDepthCpuImageApi { get; }
Property Value
Type | Description |
---|---|
XRCpuImage.Api |
environmentDepthTemporalSmoothingEnabled
Property to be implemented by the provider to get whether temporal smoothing is currently applied to the environment depth image.
Declaration
public virtual bool environmentDepthTemporalSmoothingEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
environmentDepthTemporalSmoothingRequested
Property to be implemented by the provider to get whether temporal smoothing has been requested for the environment depth image.
Declaration
public virtual bool environmentDepthTemporalSmoothingRequested { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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 |
requestedEnvironmentDepthMode
Property to be implemented by the provider to get or set the environment depth mode.
Declaration
public virtual EnvironmentDepthMode requestedEnvironmentDepthMode { get; set; }
Property Value
Type | Description |
---|---|
EnvironmentDepthMode | The requested environment depth mode. |
requestedHumanDepthMode
Property to be implemented by the provider to get or 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 |
requestedHumanStencilMode
Property to be implemented by the provider to get or 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 |
requestedOcclusionPreferenceMode
Specifies the requested occlusion preference mode.
Declaration
public virtual OcclusionPreferenceMode requestedOcclusionPreferenceMode { get; set; }
Property Value
Type | Description |
---|---|
OcclusionPreferenceMode | The requested occlusion preference mode. |
Methods
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. |
TryAcquireEnvironmentDepthConfidenceCpuImage(out XRCpuImage.Cinfo)
Tries to acquire the latest environment depth confidence CPU image.
Declaration
public virtual bool TryAcquireEnvironmentDepthConfidenceCpuImage(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 environment depth confidence CPU images. |
TryAcquireEnvironmentDepthCpuImage(out XRCpuImage.Cinfo)
Tries to acquire the latest environment depth CPU image.
Declaration
public virtual bool TryAcquireEnvironmentDepthCpuImage(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 environment CPU images. |
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. |
TryAcquireRawEnvironmentDepthCpuImage(out XRCpuImage.Cinfo)
Tries to acquire the latest environment depth CPU image.
Declaration
public virtual bool TryAcquireRawEnvironmentDepthCpuImage(out XRCpuImage.Cinfo cinfo)
Parameters
Type | Name | Description |
---|---|---|
XRCpuImage.Cinfo | cinfo | If this method returns |
Returns
Type | Description |
---|---|
Boolean | Returns |
Remarks
This method differs from TryAcquireEnvironmentDepthCpuImage(out XRCpuImage.Cinfo) in that it always tries to acquire the raw depth image, whereas the image provided by TryAcquireEnvironmentDepthCpuImage(out XRCpuImage.Cinfo) depends on the value of environmentDepthTemporalSmoothingEnabled.
TryAcquireSmoothedEnvironmentDepthCpuImage(out XRCpuImage.Cinfo)
Tries to acquire the latest smoothed environment depth CPU image.
Declaration
public virtual bool TryAcquireSmoothedEnvironmentDepthCpuImage(out XRCpuImage.Cinfo cinfo)
Parameters
Type | Name | Description |
---|---|---|
XRCpuImage.Cinfo | cinfo | If this method returns |
Returns
Type | Description |
---|---|
Boolean | Returns |
Remarks
This method differs from TryAcquireEnvironmentDepthCpuImage(out XRCpuImage.Cinfo) in that it always tries to acquire the smoothed depth image, whereas the image provided by TryAcquireEnvironmentDepthCpuImage(out XRCpuImage.Cinfo) depends on the value of environmentDepthTemporalSmoothingEnabled.
TryGetEnvironmentDepth(out XRTextureDescriptor)
Method to be implemented by the provider to get the environment depth texture descriptor.
Declaration
public virtual bool TryGetEnvironmentDepth(out XRTextureDescriptor environmentDepthDescriptor)
Parameters
Type | Name | Description |
---|---|---|
XRTextureDescriptor | environmentDepthDescriptor | The environment depth texture descriptor to be populated, if available. |
Returns
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if the implementation does not support environment depth texture. |
TryGetEnvironmentDepthConfidence(out XRTextureDescriptor)
Method to be implemented by the provider to get the environment depth confidence texture descriptor.
Declaration
public virtual bool TryGetEnvironmentDepthConfidence(out XRTextureDescriptor environmentDepthConfidenceDescriptor)
Parameters
Type | Name | Description |
---|---|---|
XRTextureDescriptor | environmentDepthConfidenceDescriptor | The environment depth texture descriptor to be populated, if available. |
Returns
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if the implementation does not support environment depth confidence texture. |
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. |