Class RenderMeshUtility
Helper class that contains static methods for populating entities so that they are compatible with the Entities Graphics package.
Namespace: Unity.Rendering
Assembly: Unity.Entities.Graphics.dll
Syntax
public static class RenderMeshUtility
Methods
AddComponents(Entity, EntityManager, in RenderMeshDescription, 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, MaterialMeshInfo materialMeshInfo)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity to set the component values for. |
EntityManager | entityManager | The Unity.Entities.EntityManager used to set the component values. |
RenderMeshDescription | renderMeshDescription | The description that determines how the entity is to be rendered. |
MaterialMeshInfo | materialMeshInfo | The MaterialMeshInfo containing the mesh and material ids |
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)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity to set the component values for. |
EntityManager | entityManager | The Unity.Entities.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. |