I made a basic slider in UE4 to change to volume of my SoundClass. In the editor it gets changed and saved between levels but when I’m running it on my iPhone. In between levels the sound goes back to it’s original settings when changing to another level.
Hello wettrix,
There are flags which allow your sounds to persist across levels, bIgnoreForFlushing flag on AudioComponents and ActiveSounds.
Hello!
Is this flag exposed to Blueprint? Or I have to write a cpp block? I’ve never added cpp blocks for blueprints before.
You would need to add this as code as this variable is not exposed to blueprints. There was a feature request entered for this issue UE16541 Support Continuous Sound Play Through a Level Load.
We unfortunately do not support continuous sound play through a level load at the moment. It’s probably something that can be easily supported, but would be a feature request at this point. The audio engine shuts all sounds down when unloading a level.
You should be able to add this variable pretty simply without much knowledge of code in general. If you need help on how to implement this code, take a look at our documentation. It will get you started in the right place.
Thank you,