Closed davcri closed 2 years ago
it this why calling Node.PAUSE_MODE_PROCESS on the _ready function does nothing? If i moved it to start() it functions correctly however the timing is a bit off.
Hi @poseisharp, your issue is not linked to this one. I opened a separate one and in the next version I'll add a fix for your problem! Thanks for reporting your experience!
Hi @poseisharp the issue should be fixed now on main
! Let me know what do you think about it!
Thank you, looks good now.
Also I've found a somewhat weird behavior but this might be intended.
When I ran a single scene it triggers _force_main_scene_load()
In the scene I have a Tween.start()
in the _ready()
function
the tween did start but it looks like it didn't work, then I realized that the scene is removed from tree and added back again by _force_main_scene_load()
since it's only removed from the tree the _ready()
function is not called for the second time.
And tween resets on tree exit so it looks like the tween does nothing.
But yeah things are working well if the main scene is already running with the container.
Thanks a lot for checking and reporting!
As you already guessed, it's a side effect of _force_main_scene_load()
. I plan to rewrite this part in a simpler way (I want to avoid removing and re-adding all the nodes on "play scene").
The commit 17b19e6a19cf3e146968100c64b3297a7d84c034 includes a big refactoring of the game-template into an addon. Now the project should be easier to use:
get_tree().current_scene
instead of Game.get_active_scene()
get_tree().change_scene()
should now work without messing with the template features (transitions will still work as expected)
This behaviour could be annoying for many people that rely on default Node events.