AudioListener.enabled works is editor, but not on IOS
So, I am creating an iOS game, and I have a button to mute all sound. I achieve that by setting AudioListener.enabled = false. This works perfectly in the editor, but when I install my game on the iPhone, the sound is still playing. What is wrong?
void Update () {
if (IsSoundOn == true) {
GetComponent<AudioListener> ().enabled = true;
} else {
GetComponent<AudioListener> ().enabled = false;
}
}
Answer by TUTOCF · May 08, 2017 at 08:49 AM
Your script is correct. I don't see any mistakes. Try to upgrade your Unity version. Maybe it's a problem coming of your used version... Kinds Regards ;)
Your answer
Follow this Question
Related Questions
Unity 2018.2.0f2 i can't set the Target minimum iOS Version 1 Answer
Deferred rendering path still not working on IOS?How can it be supported? 0 Answers
Background image is too bright on iOS, ok in Editor and Android APK 0 Answers
iOS build size is too large 0 Answers
NGUI - OnPress Trigger is not working in IOS Devices 1 Answer