quo
New Member
Posts: 13
Posts: 13
|
Post by quo on Oct 9, 2022 3:44:14 GMT
I have a winged enemy that plays the sound of wings flapping on a loop. If the player opens the menu, I'd like the wing flapping loop to stop. If the player unpauses the menu, I'd like the loop to resume.
I've been able to get this to work with a regular Master Audio sound and pausing the bus the sound is in. Seen in this video here:
However, if I change the wing flapping sound to be a DSGC sound, pausing the bus will cause the DSGC sound to stop completely (not pause). Then when the bus is unpaused, the DSGC sound does not resume. (seen in latter half of above video)
I encounter this same problem using both MasterAudio.PauseBus() and MasterAudio.PauseMixer().
Is there a way to get DSGC sounds to exhibit the same behavior as regular mixer sounds when it comes to pausing/unpausing the bus?
Appreciate the help! Thanks!
|
|
|
Post by DarkTonic Dev on Oct 9, 2022 16:52:59 GMT
It's supposed to work the same. In fact there's one in the provided example Scenes. _Standalone Scene has a clip "King" that resumes playing if you pause the mixer, I just tried it.
Now, if you're using Resource files, Addressables or have Preload Audio Data unchecks on the audio clip, the default behavior is to unload the click so there's no memory leak if you forget to unpause it. You can choose not to do this with the checkbox in Advanced Settings under Audio Settings called "Keep Paused Resources".
-Brian
|
|
quo
New Member
Posts: 13
Posts: 13
|
Post by quo on Oct 9, 2022 21:44:18 GMT
Ahh! I had "Auto Remove Items" unchecked on the DSGC. Didn't know there was another variable guarding a similar behavior.
But that did the trick, so it's working great now. Thank you very much!
|
|
|
Post by DarkTonic Dev on Oct 10, 2022 0:39:02 GMT
|
|