I am developing a prototype for a game and it seems that the _ready function in objects in scene tree are not executing consistently the first time it plays from when I use 'get_tree().reload_current_scene()' to restart the game.
From placing breakpoints in code, I have came to the conclusion that the reason why it might not be executing is because 'yield(get_tree().root, "ready")' is blocking the code from executing for some reason.
It seems that getting rid of this, gets rid of certain errors. But due to dependencies of executing the the parent's ready functions first, it may not work.
How can I fix this type of error and make my code less error prone when using this yield function?
Best regards