From 7bae94910eea4e8da5a4ac5c12042b1e6d2cfad4 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 29 May 2022 23:51:24 +0200 Subject: [PATCH] Update VisibleOnScreenNotifier2D when rect changed --- scene/2d/visible_on_screen_notifier_2d.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/2d/visible_on_screen_notifier_2d.cpp b/scene/2d/visible_on_screen_notifier_2d.cpp index 33dd7374163d..1971dc12403b 100644 --- a/scene/2d/visible_on_screen_notifier_2d.cpp +++ b/scene/2d/visible_on_screen_notifier_2d.cpp @@ -66,6 +66,7 @@ void VisibleOnScreenNotifier2D::set_rect(const Rect2 &p_rect) { if (is_inside_tree()) { RS::get_singleton()->canvas_item_set_visibility_notifier(get_canvas_item(), true, rect, callable_mp(this, &VisibleOnScreenNotifier2D::_visibility_enter), callable_mp(this, &VisibleOnScreenNotifier2D::_visibility_exit)); } + update(); } Rect2 VisibleOnScreenNotifier2D::get_rect() const {