menu
 

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

0 支持
When running a build and tabbing away from the game window, the game continues silently, however during this time the audio event triggers will be stacking. When the game window regains focus, all these events will suddenly play together at the same time, up to around 600 of them which is the max queue limit. I can see them queuing in the Wwise profiler, but this isn't the behaviour I want. I have "Render During Focus Loss" checked in Unity, but the audio isn't playing/stopping as it should when the game window isn't in focus. I don't care if it's silent, I just want it to not stack and suddenly play masses of audio when you switch back to the window.
Adam C. (120 ポイント) General Discussion

回答 2

0 支持
Any solutions for this?
Robert E. (550 ポイント)
0 支持
For anyone who is encountering this issue and doesn't know how to solve it, one way (and the way I am currently using) is to use OnApplicationFocus(bool focus) which is a method accessible from any MonoBehaviour and lets you know when the application is focused or not (I.e. tabbed in) this way you could just choose not to play any new sounds when the user is tabbed out.

Docs for its use here: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationFocus.html
John B. (140 ポイント)
...