0 votes

Ive been looking for tutorials all over the internet about how you can make music transfer between worlds but there is not a singe tutorial that shows how to do it.

in Engine by (30 points)

Just wondering: are you trying to make the music crossfade, or have it persist between worlds? I would think that, to make it persistent, you could stick a musical node in the root node, and make the rest children of this node.

You can play music persistently by adding a scene with an AudioStreamPlayer node as an autoload in the Project Settings.

1 Answer

+1 vote

There are two ways you could do it.
Use a "main" scene with your audio player in it and anything else you might want. Add a script and just add the current scene as a child scene as the world is loaded. When changing worlds, just remove that child and add the new world as a child.
Use an autoload to persistently include the music in the base game. This often has less flexibility, but it does work pretty simply.

by (621 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.