docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct AROcclusionFrameEventArgs

    A structure for occlusion information pertaining to a particular frame. This is used to communicate information in the frameReceived event.

    Implements
    IEquatable<AROcclusionFrameEventArgs>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARFoundation
    Assembly: Unity.XR.ARFoundation.dll
    Syntax
    public struct AROcclusionFrameEventArgs : IEquatable<AROcclusionFrameEventArgs>

    Properties

    disabledMaterialKeywords

    The list of keywords to be disabled for the material.

    Declaration
    [Obsolete("disabledMaterialKeywords has been deprecated in AR Foundation version 6.0. Use shaderKeywords instead.")]
    public List<string> disabledMaterialKeywords { get; }
    Property Value
    Type Description
    List<string>

    disabledShaderKeywords

    The disabled shader keywords.

    Declaration
    [Obsolete("disabledShaderKeywords is deprecated as of AR Foundation 6.1. Use shaderKeywords instead")]
    public ReadOnlyCollection<string> disabledShaderKeywords { get; }
    Property Value
    Type Description
    ReadOnlyCollection<string>

    enabledMaterialKeywords

    The list of keywords to be enabled for the material.

    Declaration
    [Obsolete("enabledMaterialKeywords has been deprecated in AR Foundation version 6.0. Use shaderKeywords instead.")]
    public List<string> enabledMaterialKeywords { get; }
    Property Value
    Type Description
    List<string>

    enabledShaderKeywords

    The enabled shader keywords.

    Declaration
    [Obsolete("enabledShaderKeywords is deprecated as of AR Foundation 6.1. Use shaderKeywords instead.")]
    public ReadOnlyCollection<string> enabledShaderKeywords { get; }
    Property Value
    Type Description
    ReadOnlyCollection<string>

    externalTextures

    All external textures associated with occlusion for this frame.

    Declaration
    public readonly ReadOnlyList<ARExternalTexture> externalTextures { get; }
    Property Value
    Type Description
    ReadOnlyList<ARExternalTexture>

    propertyNameIds

    Ids of the property name associated with each texture. This is a parallel list to textures.

    Declaration
    [Obsolete("propertyNameIds has been deprecated in AR Foundation version 6.1. Use externalTextures instead.")]
    public List<int> propertyNameIds { get; }
    Property Value
    Type Description
    List<int>

    shaderKeywords

    The enabled and disabled shader keywords.

    Declaration
    public readonly XRShaderKeywords shaderKeywords { get; }
    Property Value
    Type Description
    XRShaderKeywords

    textures

    The occlusion textures associated with this frame. These are generally external textures, which exist only on the GPU. To use them on the CPU (for example, for computer vision processing), you must read them back from the GPU.

    Declaration
    [Obsolete("textures has been deprecated in AR Foundation version 6.1. Use externalTextures instead.")]
    public List<Texture2D> textures { get; }
    Property Value
    Type Description
    List<Texture2D>

    Methods

    Equals(object)

    Tests for equality.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare against.

    Returns
    Type Description
    bool

    true if obj is of type AROcclusionFrameEventArgs and Equals(AROcclusionFrameEventArgs) also returns true. Otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(AROcclusionFrameEventArgs)

    Indicates whether the current object is equal to another object of the same type. Collections are compared using reference equality.

    Declaration
    public bool Equals(AROcclusionFrameEventArgs other)
    Parameters
    Type Name Description
    AROcclusionFrameEventArgs other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to other. Otherwise, false.

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string.

    Overrides
    ValueType.ToString()

    TryGetFovs(out ReadOnlyList<XRFov>)

    Get an array of fields of view for the frame if possible.

    Declaration
    public bool TryGetFovs(out ReadOnlyList<XRFov> fovsOut)
    Parameters
    Type Name Description
    ReadOnlyList<XRFov> fovsOut

    The output array of fields of view, if this method returns true.

    Returns
    Type Description
    bool

    true if the frame has fields of view that were output to fovsOut. Otherwise, false.

    TryGetNearFarPlanes(out XRNearFarPlanes)

    Get the near and far planes for the frame, if possible.

    Declaration
    public bool TryGetNearFarPlanes(out XRNearFarPlanes planesOut)
    Parameters
    Type Name Description
    XRNearFarPlanes planesOut

    The near and far planes.

    Returns
    Type Description
    bool

    true if the frame has near and far planes that were output to planesOut. Otherwise, false.

    TryGetPoses(out ReadOnlyList<Pose>)

    Get an array of poses from which the frame was rendered, if possible. Poses are in Unity world space.

    Declaration
    public bool TryGetPoses(out ReadOnlyList<Pose> posesOut)
    Parameters
    Type Name Description
    ReadOnlyList<Pose> posesOut

    The output array of poses, if this method returns true.

    Returns
    Type Description
    bool

    true if the frame has poses that were output to posesOut. Otherwise, false.

    TryGetTimestamp(out long)

    Get the timestamp of the frame, if possible.

    Declaration
    public bool TryGetTimestamp(out long timestampOut)
    Parameters
    Type Name Description
    long timestampOut

    The timestamp of the camera frame, in nanoseconds.

    Returns
    Type Description
    bool

    true if the frame has a timestamp that was output to timestampOut. Otherwise, false.

    Operators

    operator ==(AROcclusionFrameEventArgs, AROcclusionFrameEventArgs)

    Tests for equality. Equivalent to Equals(AROcclusionFrameEventArgs).

    Declaration
    public static bool operator ==(AROcclusionFrameEventArgs lhs, AROcclusionFrameEventArgs rhs)
    Parameters
    Type Name Description
    AROcclusionFrameEventArgs lhs

    The left-hand side of the comparison.

    AROcclusionFrameEventArgs rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    true if lhs is equal to rhs. Otherwise, false.

    operator !=(AROcclusionFrameEventArgs, AROcclusionFrameEventArgs)

    Tests for inequality. Equivalent to !Equals(AROcclusionFrameEventArgs).

    Declaration
    public static bool operator !=(AROcclusionFrameEventArgs lhs, AROcclusionFrameEventArgs rhs)
    Parameters
    Type Name Description
    AROcclusionFrameEventArgs lhs

    The left-hand side of the comparison.

    AROcclusionFrameEventArgs rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    true if lhs is not equal to rhs. Otherwise, false.

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 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)