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.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index bd7415aa04..dee67a829f 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -237,6 +237,19 @@ void PathFollow2D::_get_property_list( List<PropertyInfo> *p_list) const{
}
+String PathFollow2D::get_configuration_warning() const {
+
+ if (!is_visible() || !is_inside_tree())
+ return String();
+
+ if (!get_parent() || !get_parent()->cast_to<Path2D>()) {
+ return TTR("PathFolow2D only works when set as a child of a Path2D node.");
+ }
+
+ return String();
+
+}
+
void PathFollow2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_offset","offset"),&PathFollow2D::set_offset);