diff options
Diffstat (limited to 'scene/2d/light_occluder_2d.cpp')
| -rw-r--r-- | scene/2d/light_occluder_2d.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 8d447c3e8b..77c9b8184a 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -123,7 +123,7 @@ void LightOccluder2D::_notification(int p_what) { VS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder,get_canvas()); VS::get_singleton()->canvas_light_occluder_set_transform(occluder,get_global_transform()); - VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible()); + VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible_in_tree()); } if (p_what==NOTIFICATION_TRANSFORM_CHANGED) { @@ -132,7 +132,7 @@ void LightOccluder2D::_notification(int p_what) { } if (p_what==NOTIFICATION_VISIBILITY_CHANGED) { - VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible()); + VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible_in_tree()); } if (p_what==NOTIFICATION_DRAW) { @@ -242,6 +242,7 @@ LightOccluder2D::LightOccluder2D() { occluder=VS::get_singleton()->canvas_light_occluder_create(); mask=1; + set_notify_transform(true); } LightOccluder2D::~LightOccluder2D() { |