Search Unity

Is there an API like Graphics.DrawMeshNow() but supports MaterialPropertyBlock?

Discussion in 'General Graphics' started by syscrusher, Sep 30, 2019.

  1. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    The subject line says it all. I have some procedural meshes that are drawing exactly the way I want everywhere except the Scene View camera(s). In the Scene View, I can use DrawMeshNow() to render the meshes, but I haven't found a way to pass a custom MaterialPropertyBlock to override properties on a subset of GameObjects that use the same Material but need to set local parameters.

    I've been through the API docs but haven't found a way yet. I thought Graphics.DrawProceduralNow() might be helpful, but it doesn't take the MaterialPropertyBlock parameter either. Any ideas? Thanks!