summaryrefslogtreecommitdiff
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.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 75154c7acb..e217f2a394 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -30,7 +30,7 @@
#include "visibility_notifier_2d.h"
-#include "core/engine.h"
+#include "core/config/engine.h"
#include "gpu_particles_2d.h"
#include "scene/2d/animated_sprite_2d.h"
#include "scene/2d/physics_body_2d.h"
@@ -313,12 +313,17 @@ void VisibilityEnabler2D::_node_removed(Node *p_node) {
}
String VisibilityEnabler2D::get_configuration_warning() const {
+ String warning = VisibilityNotifier2D::get_configuration_warning();
+
#ifdef TOOLS_ENABLED
if (is_inside_tree() && get_parent() && (get_parent()->get_filename() == String() && get_parent() != get_tree()->get_edited_scene_root())) {
- return TTR("VisibilityEnabler2D works best when used with the edited scene root directly as parent.");
+ if (!warning.empty()) {
+ warning += "\n\n";
+ }
+ warning += TTR("VisibilityEnabler2D works best when used with the edited scene root directly as parent.");
}
#endif
- return String();
+ return warning;
}
void VisibilityEnabler2D::_bind_methods() {