Unity3D - Audio playing getting muted after getting any call/notification on Android

前端 未结 2 786
南旧
南旧 2021-01-19 17:14

I have audio playing issue on Android build. I\'m using Unity 5.4.0b15, but I had same issue on 5.3.4p3.

I have simple component for playing background music added t

2条回答
  •  执念已碎
    2021-01-19 17:45

    This is definitely a bug in Unity. I bumped into the same problem and ran some tests to try to fix it but there is no way to recover the audio without restarting the app.

    In my tests I used Google Hangouts notifications to kill the audio.

    Programmer's proposed fix won't work because: 1. The notification does not trigger application pause nor application focus events. 2. Initializing a new AudioListener and/or AudioSource instances will not recover the audio either.

    This is a low level bug in Unity. I will make a report on the bug.

提交回复
热议问题