- Home /
Muting all Sound / Music from options menu
Hey guys. I'm implementing the following in my options menu:
Sound ON/OFF (Completely muted throughout all scenes). Sound adjustable with a slider (throughout all scenes as well). Music ON/OFF (Completely muted throughout all scenes). Music adjustable with a slider (throughout all scenes as well).
My Music ON/OFF is working at the moment, but only for 1 scene. How would I mute everything? All my sounds are currently in 1 script (not Music, only sound), but I can't figure out how to mute it?
Answer by Cuttlas-U · May 28, 2017 at 12:05 PM
hi; u need to use PlayerPrefs to store the current value of that slider witch u set in the first scene;
then when another scene is loaded create a script for each audio source ( or u can create 1 with an array of audio sources that reach every audio source with a loop ) to load that prefab value and set it to the audio source volume;
Your answer
![](https://koobas.hobune.stream/wayback/20220612122146im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Trigger audio loop on beat with PlayScheduled 1 Answer
How To Turn Off Sound For Certain Objects? 1 Answer
How do I Synchronize GameObjects to move to the beat of music? 2 Answers
Audio Scripting 1 Answer
Multiple Cars not working 1 Answer