diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/navigation_polygon.cpp | 2 | ||||
-rw-r--r-- | scene/2d/path_2d.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index ea79f89dd9..883fb37668 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -259,7 +259,7 @@ void NavigationPolygon::make_polygons_from_outlines() { TriangulatorPartition tpart; if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed! - ERR_PRINTS("NavigationPolygon: Convex partition failed!"); + ERR_PRINT("NavigationPolygon: Convex partition failed!"); return; } diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 6ae008548e..ef7c343c1a 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -120,9 +120,15 @@ void Path2D::_notification(int p_what) { } void Path2D::_curve_changed() { + if (!is_inside_tree()) { + return; + } + + if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_navigation_hint()) { + return; + } - if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) - update(); + update(); } void Path2D::set_curve(const Ref<Curve2D> &p_curve) { |