docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ARExternalTexture

    Represents an external texture on the GPU.

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

    Constructors

    ARExternalTexture(Texture, int)

    Constructor.

    Declaration
    public ARExternalTexture(Texture texture, int propertyId)
    Parameters
    Type Name Description
    Texture texture

    The texture.

    int propertyId

    The texture's property ID.

    Properties

    propertyId

    ID of the shader property associated with this texture.

    Declaration
    public int propertyId { get; }
    Property Value
    Type Description
    int
    See Also
    xref:UnityEngine.Shader.PropertyToID(System.String)

    texture

    The external texture.

    Declaration
    public Texture texture { get; }
    Property Value
    Type Description
    Texture
    Remarks

    This texture may only exist on the GPU. Refer to your provider documentation for more information.

    If this is a GPU texture, to use the texture on the CPU, you must read it back from the GPU using Texture2D.ReadPixels.

    Methods

    Equals(object)

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

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

    An object to compare with this object.

    Returns
    Type Description
    bool

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

    Overrides
    ValueType.Equals(object)

    Equals(ARExternalTexture)

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

    Declaration
    public bool Equals(ARExternalTexture other)
    Parameters
    Type Name Description
    ARExternalTexture 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()

    Operators

    operator ==(ARExternalTexture, ARExternalTexture)

    Tests for equality. Equivalent to Equals(ARExternalTexture).

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

    The left-hand side of the comparison.

    ARExternalTexture rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

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

    operator !=(ARExternalTexture, ARExternalTexture)

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

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

    The left-hand side of the comparison.

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