summaryrefslogtreecommitdiff
path: root/scene/3d/light.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/light.cpp')
-rw-r--r--scene/3d/light.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 7713a262ef..6cf50450ac 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -435,15 +435,20 @@ void Light::_update_visibility() {
if (!is_inside_scene())
return;
+
+
+#ifdef TOOLS_ENABLED
bool editor_ok=true;
if (editor_only) {
-
if (!get_scene()->is_editor_hint()) {
editor_ok=false;
} else {
editor_ok = (get_scene()->get_edited_scene_root() && (this==get_scene()->get_edited_scene_root() || get_owner()==get_scene()->get_edited_scene_root()));
}
}
+#else
+ bool editor_ok=false;
+#endif
VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && enabled && editor_ok);