[BUG]? Play Sound 2D not pauseable

Not sure if this is a bug but it’s something I just noticed… if you use the node play sound 2D to play an audio file, the audio does not pause when you activate the SetGamePaused action (while entering a menu UMG for example). I’m currently going through all of my blueprints and converting any sound 2D to Sound At Location nodes and playing them at the player location as it seems that world sounds are pauseable.

Hello TorQueMoD,

So the reason your ‘Play Sound 2D’ audio is not getting paused whenever you call ‘Set Game Paused’, is that these types of sounds do not contain an audio component. This component is necessary when calling the game state to pause.

You have already found one of the ways to workaround this intended functionality, and below I have highlighted another solution. There are a number of ways to do this, but establishing a boolean that checks to see if the game is paused, and then setting any sounds that contain an audio component to pause.

Set Game Paused - Play Sound 2D

This will allow you to pause your spawned 2D sounds. Keep in mind, UI or 2D sounds called to play without spawning do not contain an audio component, therefore cannot be called to pause. This is why the Play Sound at Location works with just the ‘Set Game Paused’ option because it is not flagged as a UI sound and contains an audio component.

Let me know if you have further questions or need additional assistance.

Thank you,

Thanks Andrew!
So I’m guessing the Sound 2D is meant to be used for menu/UI sounds that you specifically want to play when the game is paused? Like button sounds etc.?

Sorry for necroposting, but in UE5 there is a “Set UISound” node that allows to set the 2D sound to be pausable with SetGamePaused.