Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Graphics.DrawMeshInstanced() not working

Discussion in 'Universal Render Pipeline' started by ryanzec, Dec 1, 2020.

  1. ryanzec

    ryanzec

    Joined:
    Jun 10, 2008
    Posts:
    696
    I am trying to use `Graphics.DrawMeshInstanced()` with URP and can't get it working. From what I have found, I know this does not work in `Update()` anymore however I have tried a few different ways that also don't seem to work.

    First I tried added the code to `OnRenderObject()` and `onPostRender()` and neither of those are call at all (verified with a log to console that did not show up). I also tried adding this code to a method I added to the `RenderPipelineManager.endCameraRendering`
    and while that code does execute unlike the other 2 (verify with a log to the console that does show up), it still does not render anything to the screen.

    What do I need to do to get the functionality of `Graphics.DrawMeshInstanced()` working in URP?