ALine - Getting a CommandBuilder and disabling it

Hello, is it possible to create a Command Builder, fill it with commands and not render it? I would like to have a conditional debug rendering of debug for game features, without having to add an if - if(feature render enabled) { builder.Line…}.. for each place I need to add a debug draw calls.

Something like: var draw = DrawingManager.GetBuilder(true); draw.SetActive(false);

I would create such draw per feature, and be able to disable / enable draw of a feature from a single place…

Yes, you can call builder.DiscardAndDispose(). But note that you’ll still be paying the overhead for adding all the debug info to the command builder.

See DiscardAndDispose - ALINE

Thanks. Yes, I am aware of the overhead, an empty interface would be better, even though I would still pay for the calculation of the positions/colors etc.