Struct MaterialMeshInfo
Represents which materials and meshes to use to render an entity.
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 |
---|---|
Material |
Creates an instance of MaterialMeshInfo from material and mesh/sub-mesh IDs registered with Entities |
Fields
Properties
Name | Description |
---|---|
Has |
True if the MaterialMeshInfo is using a MaterialMeshIndex range. |
Material |
The material ID property. |
Material |
The MaterialMeshIndex range. |
Mesh |
The mesh ID property. |
Sub |
The sub-mesh ID. |
Methods
Name | Description |
---|---|
Array |
Converts the given array index (typically the index inside RenderMeshArray) into a negative number that denotes that array position. |
From |
Creates an instance of MaterialMeshInfo from a range of material/mesh/submesh index in the corresponding RenderMeshArray. |
From |
Creates an instance of MaterialMeshInfo from material and mesh/sub-mesh indices in the corresponding RenderMeshArray. |
Static |
Converts the given static index (a negative value) to a valid array index. |