Skip to content

Commit

Permalink
Merge pull request godotengine#92288 from smix8/navregion_debug
Browse files Browse the repository at this point in the history
Fix NavigationRegion3D not reacting to runtime debug enabled change
  • Loading branch information
akien-mga committed May 23, 2024
2 parents f25676c + a545ba0 commit b7feebe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scene/3d/navigation_region_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ void NavigationRegion3D::_update_debug_mesh() {
return;
}

if (!NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
if (!NavigationServer3D::get_singleton()->get_debug_enabled() || !NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
if (debug_instance.is_valid()) {
RS::get_singleton()->instance_set_visible(debug_instance, false);
}
Expand Down Expand Up @@ -640,7 +640,7 @@ void NavigationRegion3D::_update_debug_mesh() {

#ifdef DEBUG_ENABLED
void NavigationRegion3D::_update_debug_edge_connections_mesh() {
if (!NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
if (!NavigationServer3D::get_singleton()->get_debug_enabled() || !NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
if (debug_edge_connections_instance.is_valid()) {
RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
}
Expand Down

0 comments on commit b7feebe

Please sign in to comment.