You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Fix navigation debug not toggleable in scripts
Fixes that navigation debug was not toggleable in script while even the docs mentioned it.
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user