You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Add Path2D/3D debug options
Add Path2D/3D debug options.
This commit is contained in:
@@ -173,6 +173,7 @@ static Vector2 init_custom_pos;
|
||||
static bool use_debug_profiler = false;
|
||||
#ifdef DEBUG_ENABLED
|
||||
static bool debug_collisions = false;
|
||||
static bool debug_paths = false;
|
||||
static bool debug_navigation = false;
|
||||
#endif
|
||||
static int frame_delay = 0;
|
||||
@@ -350,6 +351,7 @@ void Main::print_help(const char *p_binary) {
|
||||
OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n");
|
||||
#if defined(DEBUG_ENABLED)
|
||||
OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-paths Show path lines when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-stringnames Print all StringName allocations to stdout when the engine quits.\n");
|
||||
#endif
|
||||
@@ -1098,6 +1100,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
#if defined(DEBUG_ENABLED)
|
||||
} else if (I->get() == "--debug-collisions") {
|
||||
debug_collisions = true;
|
||||
} else if (I->get() == "--debug-paths") {
|
||||
debug_paths = true;
|
||||
} else if (I->get() == "--debug-navigation") {
|
||||
debug_navigation = true;
|
||||
} else if (I->get() == "--debug-stringnames") {
|
||||
@@ -2330,6 +2334,9 @@ bool Main::start() {
|
||||
if (debug_collisions) {
|
||||
sml->set_debug_collisions_hint(true);
|
||||
}
|
||||
if (debug_paths) {
|
||||
sml->set_debug_paths_hint(true);
|
||||
}
|
||||
if (debug_navigation) {
|
||||
sml->set_debug_navigation_hint(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user