Sounds mute in unity-made game when sound from any other app plays.

I am using Unity 5.4.0b10 and I made a game using it and ported it to android.
It runs fine in my device and in normal condition the sfx works fine.

But if I, say, run a music player in a background, or say, a notification sound plays in the background due to some incoming message, then the sound stops playing in the unity game…and the only way to make it work again is to restart the game.

Any idea why this can be happening?

same problem! did you got solution?

You're right, I got the rigidbodyshortcut mixed up with it.

3 Answers

3

“Android: Mute audio if audio focus is lost” is a bug on Unity 5.4.0b10.

Its fixed on Unity 5.4.0b11

Reference:
https://unity3d.com/unity/beta/unity5.4.0b11

Are you sure it's fixed? I'm still having the same problem in 5.4.0b17 - e.g. when in game and recieve an email notification, sfx stops working.

That may be it. I downgraded to the stable version before your reply...and the issue was fixed. I also experienced crashes and other issues in 5.4.0b10...all of which didn't exist after loading the project in a stable version.

I also facing same problem.You have any solution how to fix it.

Not working on latest 5.4.0 b24 Shame on Unity !!! Such a basic functionality to be non working for so long and still not being fixed...Maybe Flash to Unity migration was mistake

This is still here in 2017.3.0f3

i got the problem on 5.3.5 also

i was wondering if i could use android method to play sound , instead of audio in unity

Use Unity 5.4.0f3 - the problem is finally fixed.

after i try so many version.5.4.0f3 5.3.5p8 .... finally solve it in unity5.3.4f1. f********k unity

Use the method I provided to get the world position of the touch (it also works for 2D objects). Vector3 touchWorld = RaycastHit.point; Then, use Camera.WorldToViewportPoint(touchWorld) to get the backwards transform towards the viewport. Although I don't know why you need to work in viewport space to begin with.

Must have been fixed before but is broken for us at least in 2018.3 again