{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Struct MaterialMeshInfo | Entities Graphics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MaterialMeshInfo

    Represents which materials and meshes to use to render an entity.

    Implements
    IComponentData
    IQueryTypeParameter
    IEnableableComponent
    Namespace: Unity.Rendering
    Assembly: solution.dll
    Syntax
    public struct MaterialMeshInfo : IComponentData, IQueryTypeParameter, IEnableableComponent
    Remarks

    This struct supports both a serializable static encoding in which case Material and Mesh are array indices to some array (typically a RenderMeshArray), and direct use of runtime BatchRendererGroup BatchMaterialID / BatchMeshID values.

    Constructors

    Name Description
    MaterialMeshInfo(BatchMaterialID, BatchMeshID, sbyte)

    Creates an instance of MaterialMeshInfo from material and mesh/sub-mesh IDs registered with EntitiesGraphicsSystem

    Fields

    Name Description
    Material

    The material ID.

    Mesh

    The mesh ID.

    Properties

    Name Description
    HasMaterialMeshIndexRange

    True if the MaterialMeshInfo is using a MaterialMeshIndex range.

    MaterialID

    The material ID property.

    MaterialMeshIndexRange

    The MaterialMeshIndex range.

    MeshID

    The mesh ID property.

    SubMesh

    The sub-mesh ID.

    Methods

    Name Description
    ArrayIndexToStaticIndex(int)

    Converts the given array index (typically the index inside RenderMeshArray) into a negative number that denotes that array position.

    FromMaterialMeshIndexRange(int, int)

    Creates an instance of MaterialMeshInfo from a range of material/mesh/submesh index in the corresponding RenderMeshArray.

    FromRenderMeshArrayIndices(int, int, sbyte)

    Creates an instance of MaterialMeshInfo from material and mesh/sub-mesh indices in the corresponding RenderMeshArray.

    StaticIndexToArrayIndex(int)

    Converts the given static index (a negative value) to a valid array index.

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