summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-29 20:36:43 +0200
committerGitHub <noreply@github.com>2022-06-29 20:36:43 +0200
commita7e589df382ef6a2c2557b1b3cbdcfdce389d7b6 (patch)
tree34330e7f0ca1f920f50e2bed48500cd61a6d0211 /main
parent44516d1a5c858ce0425f2c278a5a0a941dca44be (diff)
parente12e239ab4a9bb764105e3a0cde284f788cd59b3 (diff)
Merge pull request #62084 from smix8/path_debug_options_4.x
Add Path2D/3D debug options
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index bfb0eacdfc..f3c56c7205 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -175,6 +175,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;
@@ -357,6 +358,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
@@ -1107,6 +1109,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") {
@@ -2375,6 +2379,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);
}