Solution for BGM Audio Abruptly Stopping When World is Deleted During Transition in Unreal Engine

Seamless BGM Fade-Out During Unreal Engine World Transitions: Troubleshooting & Game Instance

I’m facing a persistent issue in Unreal Engine where Audio Components used for background music (BGM) are being deleted along with the old world during world transitions. This causes the BGM to abruptly cut off even when it’s supposed to be fading out.

I’ve attempted several solutions without success:

I set bStopWhenOwnerDestroyed to false when creating FAudioDevice::FCreateComponentParams.

I enabled UISound.

I tried creating and owning the AudioComponent within a UGameInstanceSubsystem.

I implemented logic to prevent Stop() calls on the Audio Component if its sound state is FadingOut.

However, despite these efforts, the sound continues to stop abruptly whenever the entire world transitions.

Is there a reliable method to ensure that the BGM fades out naturally and completely even when the world changes? I need the sound to persist and complete its fade-out rather than being instantly terminated with the old world.

Confusion Regarding Game Instance & Audio

I recall seeing a YouTube video where they used CreateSound2D within the Blueprint’s Game Instance to prevent sound from cutting off during level changes. I’m unsure how this differs from the methods I’ve already attempted.

Ultimately, even if I create audio in the Game Instance, don’t I still need a world to attach the Audio Component to? I’m struggling to understand how creating the audio in the Game Instance truly solves the problem if the Audio Component still requires a world context that gets destroyed.

재현 방법
"Reproduction Steps:

  1. Create a world.
  2. Generate and play the BGM AudioComponent from a Game Subsystem.
  3. Completely delete the current world.
  4. Create a new world."

Hello,

There is a checkbox for persisting sounds across level transition. Have you checked that?

In addition, you will also need to hold on to the AudioComponent reference in an object that persists across worlds.

[Image Removed]

Make sure when you spawn the AC, you keep a reference to the returned AC, or it will get GC’d.

CreateSound2D won’t work because it doesn’t returrn an AC handle and this checkbox is not something you can check.