UMG Music on/off button


I’d like to be able to use a button to turn background music on and off in UMG.

Thing is, I can’t use components in UMG, can’t refer to a audio file in the level itself (as far as I know). So how would I do this?

Thanks in advance

You could create a custom event in your Level Blueprint. Then call that custom event from the button click event in your widget.

Thank you. I already figured it out though. I just put it as a componant in game mode, and cast that in the widget bp.