How Can I Play Audio Between Additive Scene Changes?

Hi, all! I’m trying to avoid using DontDestroyOnLoad as recommended in the docs Unity - Manual: Work with multiple scenes in Unity
"It is recommended to avoid using DontDestroyOnLoad to persist manager GameObjects that you want to survive across scene loads. Instead, create a manager scene that has all your managers and use SceneManager.LoadScene(, LoadSceneMode.Additive)

To that end, I have three scenes. 1. Scene Persistent, full of persistent manager objects that require MonoBehaviours, like menus and fade out screens for loading, 2. Scene Start, with the main menu, and 3. a Test scene, where gameplay happens.

In the Persistent scene, I have an AudioSource to play UI sounds, so that those sounds can finish playing even when they accompany scene changes. My Start scene has a Button, whose OnClick event is connected to a ScriptableObject called Relay, which will send these requests to the AudioSource in Persistent.

This successfully starts playing the audio clip and changes the scene. However, the audio clip still cuts out when I unload the old scene Start and (additively) load the new scene Test. I added Debug.Log statements to make sure, and the gameObject holding the AudioSource in Persistent never gets its OnDisable or OnDestroy methods called. Changed state (like assigning an AudioClip) is preserved, so it’s not a new AudioSource.

My main question:

  • Can anyone explain how to keep an AudioSource playing when additively loading a new scene?

Related questions:

  • What causes the audio clip to cut out?
  • Where should my AudioListeners be in an additive scene game? I assume attached to a camera as usual, but does that mean my camera should be in the Persistent scene?
1 Like

Still not getting this quite right. Any suggestions?

I also need the solution… same problem :frowning: