Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

How to pause all sound with Unity scripts?

0 votes
I want to pause all sound with Unity scripts, what should I do?

I noticed that there is a global event named pauseall, but there isn't any version of PostEvent which doesn't require a gameobject parameter.

Thanx your advice.
asked Jun 13, 2016 in General Discussion by 吕无靥 (100 points)

2 Answers

+1 vote

This is an old question but I thought I could share my solution if anyone else is looking for it. I was able to do this by creating "PauseAll" and "ResumeAll" global events in the Wwise Events editor. The same way you'd create Play events. But you have to change from GameObject to Global under Scope on the right panel in the events editor (for ALL events).  And then Post those events in Unity with PostEvent mothod, the same way you'd post any other events. Hope this helps.

answered Sep 30, 2019 by Little Tim (160 points)
This was so helpful!
Thank you so much!
+1 vote
See AkSoundEngineController.cs (line 216)

-- AkSoundEngine.Suspend() -- pause all sounds

-- AkSoundEngine.WakeupFromSuspend() --- resume all sounds.
answered Oct 5, 2019 by Sally P. (360 points)
...