TriLib Exporter
Search Results for

    Show / Hide Table of Contents

    Class MaterialGroup

    Represents a group of materials associated with a model, providing indexed access and mapping functionality.

    Inheritance
    object
    ObjectBase
    MaterialGroup
    Inherited Members
    ObjectBase.Name
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TriLibExporter.Objects
    Assembly: Assembly-CSharp.dll
    Syntax
    public class MaterialGroup : ObjectBase

    Constructors

    MaterialGroup(AssetWriterContext, Material[])

    Initializes a new instance of the MaterialGroup class.

    Declaration
    public MaterialGroup(AssetWriterContext assetWriterContext, Material[] materials)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The asset writer context associated with this material group.

    Material[] materials

    The array of Unity materials to represent.

    Properties

    Count

    Gets the number of materials in the group.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    this[int]

    Gets the material at the specified index.

    Declaration
    public Material this[int index] { get; }
    Parameters
    Type Name Description
    int index

    The index of the material to retrieve.

    Property Value
    Type Description
    Material

    The material at the specified index.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range.

    Methods

    LoadMaterial(AssetWriterContext, int, Dictionary<Material, Material>, Material)

    Loads a material into the group, creating a new material or using an existing mapping.

    Declaration
    public Material LoadMaterial(AssetWriterContext assetWriterContext, int index, Dictionary<Material, Material> materialMapping, Material unityMaterial)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The asset writer context associated with this material.

    int index

    The index at which to load the material.

    Dictionary<Material, Material> materialMapping

    A dictionary mapping Unity materials to export-specific materials.

    Material unityMaterial

    The Unity material to load.

    Returns
    Type Description
    Material

    The loaded material.

    In this article
    Back to top Generated by DocFX