aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/visibility_notifier_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/visibility_notifier_2d.cpp')
-rw-r--r--scene/2d/visibility_notifier_2d.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 426e86fa1..2a5108c62 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -346,6 +346,16 @@ void VisibilityEnabler2D::_node_removed(Node* p_node) {
}
+String VisibilityEnabler2D::get_configuration_warning() const {
+
+ if (is_inside_tree() && get_parent() && (get_parent()->get_filename()==String() && get_parent()!=get_tree()->get_edited_scene_root())) {
+ return TTR("VisibilityEnable2D works best when used with the edited scene root directly as parent.");
+ }
+
+ return String();
+}
+
+
void VisibilityEnabler2D::_bind_methods(){
ObjectTypeDB::bind_method(_MD("set_enabler","enabler","enabled"),&VisibilityEnabler2D::set_enabler);