DrawMeshInstancedIndirect doesn't draw in OnRenderObject

Preface: This is on Oculus Quest, not Android phone.

I just spent two days trying to figure out why my procedural instanced rendering wasn’t working on Quest while it worked great in the Editor. It started working normally once I moved the DrawMeshInstancedIndirect call to the Update method.

  • I also tried the same with the example from the DrawMeshInstancedIndirect docs page, with same results

  • I tried with Single Pass as well as Multi Pass stereo rendering

  • I also made sure the shaders are explicitly included in the build and not stripped

  • I made sure OnRenderObject is still called (checked by updating a text label)

  • I tried attaching the script to various objects, including a camera

So what’s going on here?

Hi @kankane I am experiencing the same issue. Were you able to figure this one out?

Hey, I just checked my code and it seems that I ended up running it from the Update method. But honestly, I don’t remember ever finding out why it didn’t work in OnRenderObject. I think I just accepted that there are some differences between Android and Desktop behaviors.