Struct RenderMeshDescription
Describes how to setup and configure Hybrid Rendered entities. Can be used to convert GameObjects into entities, or to set component values on entities directly.
Namespace: Unity.Rendering
Syntax
public struct RenderMeshDescription
Constructors
RenderMeshDescription(Mesh, Material, ShadowCastingMode, Boolean, MotionVectorGenerationMode, Int32, Int32, UInt32)
Construct a RenderMeshDescription using the given values.
Declaration
public RenderMeshDescription(Mesh mesh, Material material, ShadowCastingMode shadowCastingMode = null, bool receiveShadows = false, MotionVectorGenerationMode motionVectorGenerationMode = null, int layer = 0, int subMeshIndex = 0, uint renderingLayerMask = 4294967295U)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | |
Material | material | |
ShadowCastingMode | shadowCastingMode | |
Boolean | receiveShadows | |
MotionVectorGenerationMode | motionVectorGenerationMode | |
Int32 | layer | |
Int32 | subMeshIndex | |
UInt32 | renderingLayerMask |
RenderMeshDescription(Renderer, Mesh, List<Material>, Int32)
Construct a RenderMeshDescription using defaults from the given
Declaration
public RenderMeshDescription(Renderer renderer, Mesh mesh, List<Material> sharedMaterials = null, int subMeshIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
Renderer | renderer | The renderer object (e.g. a |
Mesh | mesh | The mesh to use and get default bounds from. |
List<Material> | sharedMaterials | The list of materials to render the entity with.
If the list is null or empty, |
Int32 | subMeshIndex | The sub-mesh of the mesh to use for rendering. The corresponding material index
from |
Fields
FlipWinding
If this is set to true, the triangle winding will be flipped when rendering.
Declaration
public bool FlipWinding
Field Value
Type | Description |
---|---|
Boolean |
MotionMode
What kinds of motion vectors are to be generated for this entity, if any.
Corresponds to
Only affects rendering pipelines that use motion vectors.
Declaration
public MotionVectorGenerationMode MotionMode
Field Value
Type | Description |
---|---|
MotionVectorGenerationMode |
RenderMesh
The RenderMesh that will be used by the Hybrid Renderer to render this entity.
Declaration
public RenderMesh RenderMesh
Field Value
Type | Description |
---|---|
RenderMesh |
Properties
IsInMotionPass
Returns true if the entity needs to be drawn in any per-object motion pass.
Declaration
public readonly bool IsInMotionPass { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
IsValid()
Returns true if the RenderMeshDescription is valid for rendering. Returns false and logs debug warnings if invalid settings are detected.
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
Boolean | True if the object is valid for rendering. |