Topic was automatically imported from the old Question2Answer platform.
Asked By
godotuser111
I need music for my game, which i already have, but i don’t know how to implement it so it plays constantly throughout the game, even when switching scenes. does anyone know how to do this?
get_tree().change_scene("path/to/scene") #Loads the scene as it is.
or
current_scene_instance.queue_free()
var next_scene = load("path/to/scene")
var next_scene_instance = next_scene.instance()
add_child(next_scene_instance)
#Changes scenes without disrupting other nodes outside of them.
You’ll have to use the latter in order to allow nodes such as an AudioStreamPlayer to exist throughout multiple scene changes.