Field Material
The material ID.
Namespace: Unity.Rendering
Assembly: solution.dll
Syntax
public int Material
Returns
Type | Description |
---|---|
int |
Remarks
The material ID can be one of the following:
- A literal Material ID received from the RegisterMaterial API, encoded as a positive integer.
- An array index to the RenderMeshArray shared component of the entity, encoded as a negative integer.
Use the literal Material ID to change the material at runtime. Use the array index to store the material ID to disk during entity baking.