1
0
mirror of https://github.com/godotengine/godot synced 2024-07-05 18:14:09 +00:00

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.
This commit is contained in:
smix8 2024-05-23 20:01:47 +02:00
parent b947c53ddc
commit a545ba0bb7

View File

@ -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);
}
@ -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);
}