Fix editor-only visibility for lights

* Update visibility again for editor-only lights if owner changes.

Fixes #26399, supersedes #52327
This commit is contained in:
reduz
2022-06-23 08:19:18 +02:00
parent abb92861f4
commit d69e3791bf
6 changed files with 20 additions and 0 deletions

View File

@ -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;