menu
 

AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

0 支持
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.
吕无靥 (100 ポイント) General Discussion

回答 2

+1 支持

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.

Little Tim (160 ポイント)
This was so helpful!
Thank you so much!
+1 支持
See AkSoundEngineController.cs (line 216)

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

-- AkSoundEngine.WakeupFromSuspend() --- resume all sounds.
Sally P. (360 ポイント)
...