summaryrefslogtreecommitdiff
path: root/scene/2d/path_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/path_2d.cpp')
-rw-r--r--scene/2d/path_2d.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 046e4dbd41..247c389de6 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -257,11 +257,16 @@ String PathFollow2D::get_configuration_warning() const {
return String();
}
+ String warning = Node2D::get_configuration_warning();
+
if (!Object::cast_to<Path2D>(get_parent())) {
- return TTR("PathFollow2D only works when set as a child of a Path2D node.");
+ if (!warning.empty()) {
+ warning += "\n\n";
+ }
+ warning += TTR("PathFollow2D only works when set as a child of a Path2D node.");
}
- return String();
+ return warning;
}
void PathFollow2D::_bind_methods() {