docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MaterialsVariantsMeshPrimitiveExtension

    Mesh primitive level KHR_materials_variants extension.

    Inheritance
    object
    MaterialsVariantsMeshPrimitiveExtension
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: GLTFast.Schema
    Assembly: glTFast.dll
    Syntax
    [Serializable]
    public class MaterialsVariantsMeshPrimitiveExtension

    Fields

    mappings

    List of material to variants mapping.

    Declaration
    public List<MaterialVariantsMapping> mappings
    Field Value
    Type Description
    List<MaterialVariantsMapping>
    See Also
    KHR_materials_variants extension

    Methods

    TryGetMaterialIndex(int, out int)

    Retrieves the index of the material that corresponds to a material variant. If there's no match for this variant index, it returns false. In this case the default material has to be applied.

    Declaration
    public bool TryGetMaterialIndex(int variantIndex, out int materialIndex)
    Parameters
    Type Name Description
    int variantIndex

    glTF materials variant index.

    int materialIndex

    glTF material index.

    Returns
    Type Description
    bool

    True if there's a matching mapping with the provided variant index. False otherwise.

    See Also
    KHR_materials_variants extension

    See Also

    KHR_materials_variants extension
    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)