docs.unity3d.com
    Show / Hide Table of Contents

    Class XROcclusionSubsystem.Provider

    The provider which will service the XROcclusionSubsystem.

    Inheritance
    Object
    XROcclusionSubsystem.Provider
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class Provider

    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

    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/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/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.

    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

    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 NativeArray.

    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()

    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 true, this should be populated with construction information for an XRCpuImage.

    Returns
    Type Description
    Boolean

    Returns true if the environment depth confidence CPU image was acquired. Returns false otherwise.

    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 true, this should be populated with construction information for an XRCpuImage.

    Returns
    Type Description
    Boolean

    Returns true if the environment depth CPU image was acquired. Returns false otherwise.

    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 true, this should be populated with construction information for an XRCpuImage.

    Returns
    Type Description
    Boolean

    Returns true if the human depth CPU image was acquired. Returns false otherwise.

    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 true, this should be populated with construction information for an XRCpuImage.

    Returns
    Type Description
    Boolean

    Returns true if the human stencil CPU image was acquired. Returns false otherwise.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown if the implementation does not support human stencil CPU images.

    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

    true if the environment depth texture descriptor is available and is returned. Otherwise, false.

    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

    true if the environment depth confidence texture descriptor is available and is returned. Otherwise, false.

    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

    true if the human depth texture descriptor is available and is returned. Otherwise, false.

    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

    true if the human stencil texture descriptor is available and is returned. Otherwise, false.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown if the implementation does not support human stencil texture.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023