0 votes

So my project is based around doors that when interacted with change scenes to a different room. The problem is, when I start the game the audio nodes work just fine, but after changing a scene and then changing it back to the first one all the AudioStreamPlayer nodes that I placed in the editor disappear. Is there any way to bypass this bug? I don't want to place the audio nodes by code because it would take massive amounts of time. Also here's a video I made showcasing the bug, hopefully it'll explain my problem better since my english isn't perfect and this whole question is a mess probably:

youtube video here

And, I'm almost sure that this is an engine bug, because I've seen someone posting the same bug somewhere else.

in Engine by (12 points)

1 Answer

0 votes

Instead of changing the scene, you can swap the game node and keep the audio node.

For example the scene tree would look like this:

-- Audio Nodes
-- Game Node

Then when you want to switch scenes, you remove the Game Node, and you instance the other level and add_child.

That will do the same thing as switching a scene but will let you keep the nodes you want. e.g. Audio, GUI, etc..

by (90 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.