docs.unity3d.com
    Show / Hide Table of Contents

    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 = ShadowCastingMode.Off, bool receiveShadows = false, MotionVectorGenerationMode motionVectorGenerationMode = MotionVectorGenerationMode.Camera, 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 Renderer and Mesh objects.

    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 MeshRenderer) to get default settings from.

    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, UnityEngine.Renderer.GetSharedMaterials(System.Collections.Generic.List{UnityEngine.Material}) will be used to obtain the list. An explicit list can be supplied if you have already called UnityEngine.Renderer.GetSharedMaterials(System.Collections.Generic.List{UnityEngine.Material}) previously, or if you want to use different materials.

    Int32 subMeshIndex

    The sub-mesh of the mesh to use for rendering. The corresponding material index from will be used as the material for that sub-mesh.

    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 motionVectorGenerationMode.

    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.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023