I did not even know change_scene_to_packed
existed, tbh. In the game I’m currently working on, I’m using a container scene that instantiates and deletes scenes on the fly, which means I’m just using instantiate
. Not saying my architecture is better, but that may be related to the usage of that scene changing function.
Maybe some useful info here? Change_scene_to_packed not working after it's worked so far
You may have already read those threads, but I prefer sharing those just in case.
If using exported variables to access your scenes doesn’t work as some values get null or corrupted, maybe you could use another way.
For instance, reference the scenes in a script you can access from anywhere (using an autoload, maybe) using the scenes paths:
var main_menu_scene: PackedScene
var house_scene: PackedScene
func _ready():
main_menu_scene: "scenes/main_menu.tscn"
house_scene: "scenes/house.tscn"
I know that’s not the solution you’re looking for, but if that is more stable and if you don’t have tons of scenes to include, something like this may do the job quiet well.