Delete a PackedScene and create a new one

Godot Version



I would like to delete a PackedScene in my game with queue_free and wait a bit with await and then call a new PackedScene and probably best do all of this from the Main_Scene. And I would like to do this more often for my challenge in the game and I have no idea how I could implement it.

You can start with the custom scene switcher example from the documentation Singletons (Autoload) — Godot Engine (stable) documentation in English

1 Like

make a scene changing code that remove_child, queue_free it, then load, instantiate PackedScene and add_child the scene you wanted to show in your game
this will need you to have a Core or Main Script that control the scene changing and will never be removed/queue_freed once the game started

here is pretty rough idea how it’s being setup:

1 Like

Thanks for the quick responses.

1 Like