Thanks. I did not know about the “Remote” scene tab. That helped me figure out what was happening. There was some code on _ready
that was calling queue_free
on a group which included the enemy I had placed. When that code ran, the visibility notifier signal was also triggered.
I have another question now, is it possible to differentiate whether the screen_exited
signal is called because it actually went out of the screen versus the parent node was deleted using queue_free
? Doesn’t look like it provides any arguments. I guess I need to check myself using is_queued_for_deletion
from Object — Godot Engine (3.5) documentation in English
Looking around I found someone who had a similar issue but they decided to check screen coordinates manually instead of relying on the VisibilityNotifier.