Skip to content

Commit a545ba0

Browse files
committed
Fix NavigationRegion3D not reacting to runtime debug enabled change
Fixes NavigationRegion3D not reacting when the main debug enabled property got changed as it only looked at the navigation mesh specific debug.
1 parent b947c53 commit a545ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scene/3d/navigation_region_3d.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void NavigationRegion3D::_update_debug_mesh() {
474474
return;
475475
}
476476

477-
if (!NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
477+
if (!NavigationServer3D::get_singleton()->get_debug_enabled() || !NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
478478
if (debug_instance.is_valid()) {
479479
RS::get_singleton()->instance_set_visible(debug_instance, false);
480480
}
@@ -640,7 +640,7 @@ void NavigationRegion3D::_update_debug_mesh() {
640640

641641
#ifdef DEBUG_ENABLED
642642
void NavigationRegion3D::_update_debug_edge_connections_mesh() {
643-
if (!NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
643+
if (!NavigationServer3D::get_singleton()->get_debug_enabled() || !NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
644644
if (debug_edge_connections_instance.is_valid()) {
645645
RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
646646
}

0 commit comments

Comments
 (0)