How I can mute music by toggle !!
Hello , i have tired from this problem , i want to muting and Unmuting the music , how i can controlling in AudioSource attached With my MusicPrefab by mute toggle And Slider ??
This Is My Script :
var MusicPrefap : Transform ;
var Source : AudioSource ;
function Start () {
if(!GameObject.FindGameObjectWithTag ("GMusic")){
var Mmanager = Instantiate(MusicPrefap , transform.position, Quaternion.identity);
Mmanager.name = MusicPrefap.name ;
Source = Mmanager.GetComponent(AudioSource);
DontDestroyOnLoad(Mmanager);
}
}
Comment
Your answer
Follow this Question
Related Questions
Game Show Happy Birthday whenever Birthday Will Come 1 Answer
Using Grid-like singletons for continuous Audio 0 Answers
How to stop the main music and play the GameOver music when a player dies? 2 Answers
Do not mute music player on Android 2 Answers
Game muted when copy it from PC to Mac,Game built on PC is muted when tested on Mac 0 Answers