Options Menu - Audio Toggle

Hiya - I’m currently making a project and I want to add the option to turn the Music/SFX/Narration on and off from a button in the Settings UI. However, I’m confused on how I’m supposed to connect the toggle to turn the audio off in the game.

Just a note as well, there’s no music in the menu (this is intentional). Any help would be appreciated!

Hi @dhorne2005
Let’s see…

To include an audio toggle (Music, SFX, Narration) in your game’s settings UI in UE:

Create Sound Classes:

Create separate Sound Classes for Music, SFX, and Narration (Right-click in the Content Browser > Sounds > Sound Class)

Design the Settings UI:

Include sliders or checkboxes for Music, SFX, and Narration in your Settings Widget Blueprint.

Blueprint Logic:

Use Set Sound Mix Class Override to control the volume of each Sound Class according to the slider or toggle button inputs

For toggle buttons, make the volume 0 to mute and 1 for normal volume.

Mute/Unmute Logic:

Use Boolean values to track if the audio is on or off

On checkbox toggle, adjust the corresponding volume (e.g., make music volume 0 to mute).

No Music in Menu:

Make sure the music is turned down or not allocated to the menu’s Sound Mix.

This way, the players will be able to manage individual audio categories from the settings UI

1 Like