docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XROcclusionSubsystem.Provider

    The provider which will service the XROcclusionSubsystem.

    Inheritance
    object
    SubsystemProvider
    SubsystemProvider<XROcclusionSubsystem>
    XROcclusionSubsystem.Provider
    Inherited Members
    SubsystemProvider<XROcclusionSubsystem>.TryInitialize()
    SubsystemProvider<XROcclusionSubsystem>.Start()
    SubsystemProvider<XROcclusionSubsystem>.Stop()
    SubsystemProvider<XROcclusionSubsystem>.Destroy()
    SubsystemProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public abstract class XROcclusionSubsystem.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 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 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
    bool

    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
    bool

    humanDepthCpuImageApi

    The XRCpuImage.Api for interacting with an XRCpuImage acquired with TryAcquireHumanDepthCpuImage(out 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 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 enabled if the implementation does not support human segmentation.

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

    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
    [Obsolete("GetMaterialKeywords(out List<string>, out List<string>) has been deprecated in AR Foundation version 6.0. Use GetShaderKeywords() instead.")]
    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.

    GetShaderKeywords()

    Get the enabled and disabled shader keywords for the material.

    Declaration
    public virtual ShaderKeywords GetShaderKeywords()
    Returns
    Type Description
    ShaderKeywords

    The enabled and disabled shader keywords 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.

    TryAcquireEnvironmentDepthConfidenceCpuImage(out 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
    bool

    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 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
    bool

    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 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
    bool

    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 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
    bool

    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.

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

    Returns
    Type Description
    bool

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

    Remarks

    This method differs from TryAcquireEnvironmentDepthCpuImage(out Cinfo) in that it always tries to acquire the raw depth image, whereas the image provided by TryAcquireEnvironmentDepthCpuImage(out Cinfo) depends on the value of environmentDepthTemporalSmoothingEnabled.

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

    Returns
    Type Description
    bool

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

    Remarks

    This method differs from TryAcquireEnvironmentDepthCpuImage(out Cinfo) in that it always tries to acquire the smoothed depth image, whereas the image provided by TryAcquireEnvironmentDepthCpuImage(out 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
    bool

    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
    bool

    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
    bool

    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
    bool

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)