docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AttributesExtensions

    Bounds-checked, allocation-aware index accessors for the indexed attribute families on Attributes (TEXCOORD_n, COLOR_n, JOINTS_n, WEIGHTS_n).

    Inheritance
    object
    AttributesExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Gltfast.Objects
    Assembly: Unity.Cloud.Gltfast.dll
    Syntax
    public static class AttributesExtensions

    Methods

    GetColor(Attributes, int)

    Returns COLOR_<n>'s accessor index (where n is index), or null if unset.

    Declaration
    public static int? GetColor(this Attributes attributes, int index)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Color set index.

    Returns
    Type Description
    int?

    Accessor index

    GetJoint(Attributes, int)

    Returns JOINTS_<n>'s accessor index (where n is index), or null if unset.

    Declaration
    public static int? GetJoint(this Attributes attributes, int index)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Joints set index.

    Returns
    Type Description
    int?

    Accessor index

    GetTexCoord(Attributes, int)

    Returns TEXCOORD_<n>'s accessor index (where n is index), or null if unset.

    Declaration
    public static int? GetTexCoord(this Attributes attributes, int index)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Texture coordinates index.

    Returns
    Type Description
    int?

    Accessor index

    GetTexCoordsCount(Attributes)

    Returns the number of texture coordinate sets.

    Declaration
    public static int GetTexCoordsCount(this Attributes attributes)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    Returns
    Type Description
    int

    Number of texture coordinate sets.

    GetWeight(Attributes, int)

    Returns WEIGHTS_<n>'s accessor index (where n is index), or null if unset.

    Declaration
    public static int? GetWeight(this Attributes attributes, int index)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Weights set index.

    Returns
    Type Description
    int?

    Accessor index

    SetColor(Attributes, int, int?)

    Sets COLOR_<n>'s accessor index (where n is index). See SetTexCoord(Attributes, int, int?).

    Declaration
    public static void SetColor(this Attributes attributes, int index, int? value)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Color set index.

    int? value

    Accessor index, or null to clear.

    SetJoint(Attributes, int, int?)

    Sets JOINTS_<n>'s accessor index (where n is index). See SetTexCoord(Attributes, int, int?).

    Declaration
    public static void SetJoint(this Attributes attributes, int index, int? value)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Joints set index.

    int? value

    Accessor index, or null to clear.

    SetTexCoord(Attributes, int, int?)

    Sets TEXCOORD_<n>'s accessor index (where n is index). Lazily allocates TexCoords and pads with null as needed.

    Declaration
    public static void SetTexCoord(this Attributes attributes, int index, int? value)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Texture coordinates index.

    int? value

    Accessor index, or null to clear.

    SetWeight(Attributes, int, int?)

    Sets WEIGHTS_<n>'s accessor index (where n is index). See SetTexCoord(Attributes, int, int?).

    Declaration
    public static void SetWeight(this Attributes attributes, int index, int? value)
    Parameters
    Type Name Description
    Attributes attributes

    Vertex attributes.

    int index

    Weights set index.

    int? value

    Accessor index, or null to clear.

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