Persistent Audio Without Level Streaming

Hello I’d like to implement persistent audio through my levels without level streaming, I’ve tried saving the percentage played using “OnAudioPlaybackPercent” event and saving it to the game instance to be read from the next level, but it seems that there is a bug with this as it returns 0 upon building the game or restarting the editor.

Is there any other way to implement this without level streaming?\

I also read that theirs something called bignoreForFlushing in the audio component but I’m not entirely sure how I can enable that from the editor or in C++, any help would be appreciated thank you.

By ‘persistent audio’, do you mean a track that plays without interruption while different maps are loaded?

If so, then you probably will need to use streaming, and play the audio from the persistent level.

Can you give a bit more information?

Yeah that’s what I want but I’d like to stay away from using level streaming if possible, the method I wrote about above was the only one I was able to come across that worked but it seems there may be a bug involved using it.

I hate to be a downer, but I think even if you get it working there’s gonna be a glitch when you change maps…

Level streaming doesn’t have to be like you see in a lot of examples. For instance I’m using it to string together a load of totally unrelated maps once I’ve finished writing them.

You can develop the maps independently and, when you’re ready, call them from one ( new ) persistent level which plays the music…

Could you elaborate on your method a little further?

As I understand from level streaming I’d have to make one persistent level then bring in all my other levels under that to be loaded/unloaded?

Is this different from what you’re doing?

Thanks for the help so far.

Almost all examples of level streaming are about open worlds and interconnected maps.

It doesn’t have to be like that at all.

You can write your levels as totally isolated things, just like old school ‘levels’ and then put it all together when you’re ready to make the game.

When you’re ready just make an ‘extra’ level which will be the persistent level. In that, you insert all your other levels ( Add existing… in the levels window ). It will look like a total mess unless you hide them all. Then the persistent level and call your first level, the first level can call any other level etc…

There’s a good example here:

Don't worry about the fact he's talking about screen widgets and menus, because each of those IS a level. Watch it about 5 times and you'll get it ;)

Tell me if you get stuck - I certainly thought is wasn’t possible for about the first year of my UE programming…

Thank you so much! I understand how to go about it now.