Struct XRTextureDescriptor | AR Subsystems | 3.1.10
docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRTextureDescriptor

    Encapsulates a native texture object and includes various metadata about the texture.

    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public struct XRTextureDescriptor : IEquatable<XRTextureDescriptor>

    Properties

    format

    Specifies the texture format of the native texture object.

    Declaration
    public TextureFormat format { get; }
    Property Value
    Type Description
    TextureFormat

    The format of the native texture object.

    height

    Specifies the height dimension of the native texture object.

    Declaration
    public int height { get; }
    Property Value
    Type Description
    Int32

    The height of the native texture object.

    mipmapCount

    Specifies the number of mipmap levels in the native texture object.

    Declaration
    public int mipmapCount { get; }
    Property Value
    Type Description
    Int32

    The number of mipmap levels in the native texture object.

    nativeTexture

    A pointer to the native texture object.

    Declaration
    public IntPtr nativeTexture { get; }
    Property Value
    Type Description
    IntPtr

    A pointer to the native texture object.

    propertyNameId

    Specifies the unique shader property name ID for the material shader texture.

    Declaration
    public int propertyNameId { get; }
    Property Value
    Type Description
    Int32

    The unique shader property name ID for the material shader texture.

    Remarks

    Use the static method Shader.PropertyToID(string name) to get the unique identifier.

    valid

    Determines whether the texture data references a valid texture object with positive width and height.

    Declaration
    public bool valid { get; }
    Property Value
    Type Description
    Boolean

    true if the texture data references a valid texture object with positive width and height. Otherwise, false.

    width

    Specifies the width dimension of the native texture object.

    Declaration
    public int width { get; }
    Property Value
    Type Description
    Int32

    The width of the native texture object.

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(XRTextureDescriptor)

    Declaration
    public bool Equals(XRTextureDescriptor other)
    Parameters
    Type Name Description
    XRTextureDescriptor other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    hasIdenticalTextureMetadata(XRTextureDescriptor)

    Determines whether the given texture descriptor has identical texture metadata (dimension, mipmap count, and format).

    Declaration
    public bool hasIdenticalTextureMetadata(XRTextureDescriptor other)
    Parameters
    Type Name Description
    XRTextureDescriptor other

    The given texture descriptor with which to compare.

    Returns
    Type Description
    Boolean

    true if the texture metadata (dimension, mipmap count, and format) are identical between the current and other texture descriptors. Otherwise, false.

    Reset()

    Reset the texture descriptor back to default values.

    Declaration
    public void Reset()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    Operators

    Equality(XRTextureDescriptor, XRTextureDescriptor)

    Declaration
    public static bool operator ==(XRTextureDescriptor lhs, XRTextureDescriptor rhs)
    Parameters
    Type Name Description
    XRTextureDescriptor lhs
    XRTextureDescriptor rhs
    Returns
    Type Description
    Boolean

    Inequality(XRTextureDescriptor, XRTextureDescriptor)

    Declaration
    public static bool operator !=(XRTextureDescriptor lhs, XRTextureDescriptor rhs)
    Parameters
    Type Name Description
    XRTextureDescriptor lhs
    XRTextureDescriptor rhs
    Returns
    Type Description
    Boolean
    Back to top
    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