Godot Version
4.2.2
Question
The starting flow of the game is this: players are given a title scene, then a level selection scene, with the button for the first level focused (the button’s grab_focus() function is called in that scene’s _ready() function). When a level is selected, play begins in that level.
If a player presses the Menu button on the controller, they are sent back to the level selection scene. However, for some reason the ready() function is not called this time, so no button is assigned focus, and no one can select any level at this point.
I’m using change_scene_to_packed() to move from one scene to the other. The documentation leads me to believe that scenes are fully torn down when moving away from them, so why wouldn’t ready() be called? Or what can I do differently?
const CHOOSE_LEVEL_SCENE : PackedScene = preload("res://Scenes/choose_level_screen.tscn")
func show_choose_level_scene():
get_tree().change_scene_to_packed(CHOOSE_LEVEL_SCENE)