When reloading the same scene which is currently the current_scene, the script attached to the root node of the scene disappears. Every other script within the scene still appears. I tested this, by putting this:

func ready(): print("[DEBUG] I have a script!") into the script of the root node of the scene. Is this a known issue, or am I doing something wrong?

I’m reloading the scene with: @onready var startMenu:PackedScene = preload("res://ui/start_menu.tscn")

func _on_reload_pressed(): get_tree().change_scene_to_packed(startMenu)

Using the latest stable version

  • Smorty [she/her]OP
    link
    110 months ago

    The button is connected to then StartMenu. I’ll see how I can send you the project… never used gitlab or similar services before.