Debug Draw 3D (and 2D) 1.4.5
Draw 3D debug graphics and 2D overlays with this add-on.
Loading...
Searching...
No Matches
DebugDrawManager Class Reference

The main singleton class that handles DebugDraw2D and DebugDraw3D. More...

#include <debug_draw_manager.h>

Inheritance diagram for DebugDrawManager:

Public Member Functions

void clear_all ()
 
void set_debug_enabled (bool value)
 
bool is_debug_enabled () const
 

Static Public Member Functions

static DebugDrawManagerget_singleton ()
 

Detailed Description

The main singleton class that handles DebugDraw2D and DebugDraw3D.

Several additional settings can be found in the project settings.

Note
The following settings require a restart.

debug_draw_3d/settings/initial_debug_state sets the initial debugging state.

debug_draw_3d/settings/common/DebugDrawManager_singleton_aliases sets aliases for DebugDrawManager to be registered as additional singletons.

debug_draw_3d/settings/common/DebugDraw2D_singleton_aliases sets aliases for DebugDraw2D to be registered as additional singletons.

debug_draw_3d/settings/common/DebugDraw3D_singleton_aliases sets aliases for DebugDraw3D to be registered as additional singletons.

Using these aliases you can reference singletons with shorter words:

var _s = Dbg3.new_scoped_config().set_thickness(0.025).set_center_brightness(0.7)
Dbg3.draw_grid_xf(%Grid.global_transform, Vector2i(10,10), Color.LIGHT_GRAY)
Dbg2.set_text("Frametime", delta)

Member Function Documentation

◆ get_singleton()

static DebugDrawManager * DebugDrawManager::get_singleton ( )
inlinestatic

Get singleton. Not available in GDScript.

◆ clear_all()

void DebugDrawManager::clear_all ( )

Clear all 2D and 3D geometry

◆ set_debug_enabled()

void DebugDrawManager::set_debug_enabled ( bool value)

Set whether to display 2D and 3D debug graphics

◆ is_debug_enabled()

bool DebugDrawManager::is_debug_enabled ( ) const

Whether debug 2D and 3D graphics are disabled


The documentation for this class was generated from the following file: