So, all the training videos I've watched recommended using a preload()
and get_tree().change_scene_to_packed()
for 'quick' change between scenes. That's what I've done in the past with my dinky learning projects. Now I'm designing my first 'real' game. I've laid out a fairly involved UI for managing word lists, player names, etc. It was all honky-dory until I got to a situation where Scene A changes to Scene B and then Scene B goes back to Scene A. That's when the Godot editor became 'unhappy' with me. Kept getting "file is invalid/corrupted" messages whenever I changed a script. I found deleting .godot cleared it up until the next time I modified a script. "invalid/corrupt" hits again. Always on the last script I edited.
Searched through issues on Github and found that Godot does not work if scenes cross load each other. Change all of the change_scene_to_packed()
to change_scene_to_file()
removed the problem.
So my question is: What is the best/preferred way to change scenes non-linearly (is that a word?) since cross-preloaded scenes is a no-no?
Since my UI is tiny in comparison to a game-play scene. My scenes are all Control nodes with a theme file and a few SVG files here and there. So, I don't see a performance hit using files instead of PackedScene, and it's the UI, not actual game-play, so who cares.