Class RenderMeshUtility
Helper class that contains static methods for populating entities so that they are compatible with the Entities Graphics package.
Namespace: Unity.Rendering
Syntax
public static class RenderMeshUtility
Methods
AddComponents(Entity, EntityManager, in RenderMeshDescription, RenderMeshArray, MaterialMeshInfo)
Set the Entities Graphics component values to render the given entity using the given description. Any missing components will be added, which results in structural changes.
Declaration
public static void AddComponents(Entity entity, EntityManager entityManager, in RenderMeshDescription renderMeshDescription, RenderMeshArray renderMeshArray, MaterialMeshInfo materialMeshInfo = default(MaterialMeshInfo))
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity to set the component values for. |
EntityManager | entityManager | The EntityManager used to set the component values. |
RenderMeshDescription | renderMeshDescription | The description that determines how the entity is to be rendered. |
RenderMeshArray | renderMeshArray | The instance of the RenderMeshArray which contains mesh and material. |
MaterialMeshInfo | materialMeshInfo | The MaterialMeshInfo used to index into renderMeshArray. |