Builtin Library
README.md
debugViz_driver
The ambient edit-mode debug-visualization driver. Requiring it registers the
built-in providers (bounds, frustum, bones, colliders, icons, wireframe) with
@builtin::modules.debugViz; the editor entrypoint requires it and calls
tick(dt) every frame.
local DebugVizDriver = require("@builtin::modules.debugViz_driver")
-- In the editor entrypoint's per-frame hook:
DebugVizDriver.tick(dt)
register()— register the built-in providers. Idempotent:registerProviderreplaces by name and a guard makes a re-require a no-op, so a category toggled off in the panel survives a module reload. Called on require and bytick.tick(dt)— per-frame hook for both modes. Edit mode always rebuilds the overlay; play mode rebuilds only while a debug session is active (debugViz.setPlaySession) and otherwise clears the batch, so play mode carries no debug-draw cost by default.
There is no per-entity opt-in — the overlay is editor tooling, driven here for
the whole scene. Toggle categories through the Debug → Visualization panel or the
debug toolbox.