summaryrefslogtreecommitdiff
path: root/servers/navigation_server_2d.cpp
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2023-02-13 12:17:24 +0100
committersmix8 <52464204+smix8@users.noreply.github.com>2023-02-16 11:12:48 +0100
commitaecad7bb25bf9b13c0ddc30a91cb68787c8dd53b (patch)
tree5d87513a00003b6ab43868f6b3b551267092719b /servers/navigation_server_2d.cpp
parentaa6ec763179e5bf1d1300aa72dc5f4172d810efa (diff)
Fix navigation debug not toggleable in scripts
Fixes that navigation debug was not toggleable in script while even the docs mentioned it.
Diffstat (limited to 'servers/navigation_server_2d.cpp')
-rw-r--r--servers/navigation_server_2d.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp
index 668b1dffc3..273bb9ceda 100644
--- a/servers/navigation_server_2d.cpp
+++ b/servers/navigation_server_2d.cpp
@@ -152,14 +152,15 @@ void NavigationServer2D::_emit_map_changed(RID p_map) {
emit_signal(SNAME("map_changed"), p_map);
}
-#ifdef DEBUG_ENABLED
void NavigationServer2D::set_debug_enabled(bool p_enabled) {
NavigationServer3D::get_singleton()->set_debug_enabled(p_enabled);
}
+
bool NavigationServer2D::get_debug_enabled() const {
return NavigationServer3D::get_singleton()->get_debug_enabled();
}
+#ifdef DEBUG_ENABLED
void NavigationServer2D::set_debug_navigation_edge_connection_color(const Color &p_color) {
NavigationServer3D::get_singleton()->set_debug_navigation_edge_connection_color(p_color);
}
@@ -341,6 +342,9 @@ void NavigationServer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("free_rid", "rid"), &NavigationServer2D::free);
+ ClassDB::bind_method(D_METHOD("set_debug_enabled", "enabled"), &NavigationServer2D::set_debug_enabled);
+ ClassDB::bind_method(D_METHOD("get_debug_enabled"), &NavigationServer2D::get_debug_enabled);
+
ADD_SIGNAL(MethodInfo("map_changed", PropertyInfo(Variant::RID, "map")));
ADD_SIGNAL(MethodInfo("navigation_debug_changed"));