- Home /
How To Turn Off Audio When At Game Scene?
Hi, So I am creating a regular 2d endless runner game and I have Many Menus Such as the main menu, select player menu and difficultly selector. I know how to play the audio using a splash screen right before the main menu but my big problem is when the user plays the game part, I have a different track of audio playing for the game, and I don't want the menu track to overlap the game track. How do i turn off audio when at game scene? c#
Use Audio $$anonymous$$ixers and snapshots : http://unity3d.com/learn/tutorials/topics/audio
Answer by Salman_Saleem · Aug 16, 2016 at 07:01 AM
You can attach different AudioSources for Menu track and game track.
And when you are in game scene, you can use audio_source.Stop() to stop that audio source or audio_source.mute=true to mute that audio source.
Your answer
Follow this Question
Related Questions
Lower volume when another audio source plays 1 Answer
Custom inspector curves similar to the 'Audio Source' volume/pan/spread Curves 0 Answers
Hololens app does not work when 'Spatialize' in AudioSource is enabled using Heavy framework. 0 Answers
Is there a more efficient way to trigger an audio source from an array to play than using a timer? 0 Answers