Having a central ImmediateModeShapeDrawer
In the doc it says, "I recommend having only one central ImmediateModeShapeDrawer in your scene, then have that call functions in other objects, in order to have full control over draw order." which I didn't quite understand. Should I make a game object and reference each component in the scene that draws a shape and call its draw function? What is the best way to have a central ImmediateModeShapeDrawer?
Thank you 🙏
So, this only applies for immediate mode, it doesn't apply to shape components in general!
But yes, each Draw.Command will issue a separate command buffer, so if you can keep all your drawing in the same command buffer, it would be more performant. you can definitely call functions in other scripts from within the Draw.Command scope of your immediate mode shape drawer if you like!