From aad01cd0c6fe9ccb6cefe4cbcc639f740ba4e641 Mon Sep 17 00:00:00 2001 From: Laurenz Reinthaler Date: Fri, 24 Sep 2021 19:00:11 +0200 Subject: [PATCH] Fix VisibilityEnabler2D throwing a signal error when process_parent or physics_process_parent are enabled --- scene/2d/visibility_notifier_2d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index c86f1a50da9..4b1be504f69 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -242,11 +242,11 @@ void VisibilityEnabler2D::_notification(int p_what) { if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent()) { get_parent()->connect(SceneStringNames::get_singleton()->ready, - get_parent(), "set_physics_process", varray(false), CONNECT_ONESHOT); + get_parent(), "set_physics_process", varray(false), CONNECT_REFERENCE_COUNTED); } if (enabler[ENABLER_PARENT_PROCESS] && get_parent()) { get_parent()->connect(SceneStringNames::get_singleton()->ready, - get_parent(), "set_process", varray(false), CONNECT_ONESHOT); + get_parent(), "set_process", varray(false), CONNECT_REFERENCE_COUNTED); } }