docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LitMaterialExport

    Converts URP/HDRP Lit shader based materials to glTF materials

    Inheritance
    object
    MaterialExportBase
    StandardMaterialExportBase
    LitMaterialExport
    Implements
    IMaterialExport
    Inherited Members
    StandardMaterialExportBase.ConvertMaterial(Material, out Material, IGltfWritable, ICodeLogger)
    MaterialExportBase.BaseColorProperty
    MaterialExportBase.MainTexProperty
    MaterialExportBase.ColorProperty
    MaterialExportBase.MetallicProperty
    MaterialExportBase.SmoothnessProperty
    MaterialExportBase.CutoffProperty
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: GLTFast.Export
    Assembly: glTFast.Export.dll
    Syntax
    public sealed class LitMaterialExport : StandardMaterialExportBase, IMaterialExport

    Methods

    GetSmoothnessProperty(bool, bool)

    Retrieves the smoothness property ID for the source material's smoothness value.

    Declaration
    protected override int GetSmoothnessProperty(bool sourceAlbedoAlpha, bool hasMetallicGlossinessMap)
    Parameters
    Type Name Description
    bool sourceAlbedoAlpha

    True when the smoothness source is the Albedo map's alpha channel.

    bool hasMetallicGlossinessMap

    True when a metallic-glossiness map is assigned to the source material.

    Returns
    Type Description
    int

    The property ID for the smoothness value property in use.

    Overrides
    StandardMaterialExportBase.GetSmoothnessProperty(bool, bool)

    HasMetallicGlossMap(Material)

    Detects whether a metallic-glossiness map is assigned to the source material.

    Declaration
    protected override bool HasMetallicGlossMap(Material uMaterial)
    Parameters
    Type Name Description
    Material uMaterial

    Unity source material.

    Returns
    Type Description
    bool

    True if the material has a metallic-glossiness map assigned, false otherwise.

    Overrides
    StandardMaterialExportBase.HasMetallicGlossMap(Material)

    IsPbrMetallicRoughness(Material)

    Detects whether the source material should be exported as a PBR Metallic-Roughness material.

    Declaration
    protected override bool IsPbrMetallicRoughness(Material material)
    Parameters
    Type Name Description
    Material material

    Unity source material

    Returns
    Type Description
    bool

    True when the exported glTF material should be PBR Metallic-Rougness based, false otherwise.

    Overrides
    StandardMaterialExportBase.IsPbrMetallicRoughness(Material)

    Implements

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