- Home /
Question by
Hoeloe · Aug 07, 2013 at 04:13 PM ·
pauseaudiolistenerfocus
AudioListener.pause set to false when window loses focus
So, I have a simple pause script, that sets the framerate to 0, and pauses the scene's AudioListener (as well as taking a screenshot of the current screen to save draw calls). However, I have a slight issue when the window loses focus. It seems that AudioListener.pause is automatically being set to false when the focus is lost, and then restored. I think this is possibly caused by the code to pause the game when it loses focus. Is there any way I can prevent this from happening, without losing the functionality of freezing the game when the focus is lost?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613111718im_/https://answers.unity.com/themes/thub/images/avi.jpg)