docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MaterialsVariantsControl

    Allows switching the materials variant of a glTF scene instance.

    Inheritance
    object
    MaterialsVariantsControl
    Implements
    IMaterialsVariantsProvider
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: GLTFast
    Assembly: glTFast.dll
    Syntax
    public class MaterialsVariantsControl : IMaterialsVariantsProvider

    Properties

    MaterialsVariantsCount

    Declaration
    public int MaterialsVariantsCount { get; }
    Property Value
    Type Description
    int
    See Also
    KHR_materials_variants extension

    Methods

    ApplyMaterialsVariantAsync(int, CancellationToken)

    Applies a materials variant.

    Declaration
    public Task ApplyMaterialsVariantAsync(int variantIndex, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int variantIndex

    glTF materials variant index.

    CancellationToken cancellationToken

    Token to submit cancellation requests. The default value is None.

    Returns
    Type Description
    Task

    A task that represents the completion of the method.

    See Also
    KHR_materials_variants extension

    GetMaterialsVariantName(int)

    Declaration
    public string GetMaterialsVariantName(int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    string
    See Also
    KHR_materials_variants extension

    Implements

    IMaterialsVariantsProvider

    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)