Advanced usage

This page details some advanced usages of the package that require some more configuration.


Rendering from different threads

This is very similar to rendering from burst jobs. You need to create a custom CommandBuilder on the main Unity thread, use it from the separate thread and then Dispose it on the main thread once you are done.

var draw = DrawingManager.GetBuilder(true);
var thread = new System.Threading.Thread(() => {
// Draw a big grid
using (draw.WithDuration(10)) {
draw.WireGrid(, Quaternion.identity, new int2(100, 100), new float2(10, 10),;


Rendering to RenderTextures

By default the package will never render to cameras that render to render textures. You can enable this using Drawing.DrawingManager.allowRenderToRenderTextures. You may also use the technique described in the next section.


Allow rendering to cameras that render to RenderTextures.

Rendering to specific cameras

By default the package will render to all valid cameras. Sometimes you may want to render to only a specific camera.

You can do this by creating a custom command builder and setting the cameraTargets property.

var draw = DrawingManager.GetBuilder(true);

draw.cameraTargets = new Camera[] { myCamera };
// This sphere will only be rendered to myCamera
draw.WireSphere(, 0.5f,;


Can be set to render specifically to these cameras.