Hi everyone,
there's a button in my mobile app with which I can free all kinds of currently running instanced scenes, in the way of
if get_node_or_null("SomeScene"):
get_node("SomeScene").queue_free()
This works just fine.
However, it appears that if I focus_out and _in again
func _notification(onscreen):
if onscreen == MainLoop.NOTIFICATION_WM_FOCUS_OUT:
...
if onscreen == MainLoop.NOTIFICATION_WM_FOCUS_IN:
the queue_free by pressing the button won't work anymore, leaving the instanced scenes running.
Maybe anyone had some similar issue with focussing out and in and could give me a hint?
There's one thing that could be connected to the problem (but I'm not sure – I think it shouldn't matter...): most of the instanced scenes queue_free
themselves from within. Some don't queue_free but keep looping a function like
func _on_Timer_timeout():
$AnimationPlayer.play("some-animation")
yield($AnimationPlayer, "animation_finished")
_on_Timer_timeout()
Is it possible that such an instance can't be queuefreed with getnodeornull?