summaryrefslogtreecommitdiff
path: root/scene/2d/light_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-23 14:03:40 +0200
committerGitHub <noreply@github.com>2022-06-23 14:03:40 +0200
commit49d061f8fc39c35a175d098d083558c93769010c (patch)
tree7cf22f30e5759866c79d9c9b077c4919f998e8c6 /scene/2d/light_2d.cpp
parentcac4e39ad293ed8af2d14f367ad5590ece76ff07 (diff)
parentd69e3791bf41dca6c29a9eb24bb92648cce2d692 (diff)
Merge pull request #62335 from reduz/fix-editor-only-visibility
Diffstat (limited to 'scene/2d/light_2d.cpp')
-rw-r--r--scene/2d/light_2d.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 28d9b284e6..0481a58431 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -30,6 +30,11 @@
#include "light_2d.h"
+void Light2D::owner_changed_notify() {
+ // For cases where owner changes _after_ entering tree (as example, editor editing).
+ _update_light_visibility();
+}
+
void Light2D::_update_light_visibility() {
if (!is_inside_tree()) {
return;