Pausing media players when the game is paused?

What is the best way to go about this? I know I could just call pause on them where I perform the pause logic, but that would require getting a reference to all of them.

Is there some engine delegate that fires when the game pause is modified that I can bind to? I looked and couldn’t find anything.

Currently, my pausing logic is handled by the pause menu widget (It pauses the game on creation, and unpauses it when destroyed)

Any ideas on how to go about this will be appreciated!!! :slight_smile:

Hey there @Estrange! I’m unsure if there’s an exposed delegate to subscribe to originally, (though many base classes seem to have pause interactions so it may just be overlooked) however in my experience when needing something similar I’ve usually wrapped my pause function in an event dispatcher and subscribed for the things that need it.

I ended up using the “GameplayMessageRouter” plugin from Lyra.
Now I essentially have a global pause delegate.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.