- Home /
SetActive on a different gameObject's component? Audio Source
I have an audio source on my zombie (moans). When I pause, I want the zombies audio source (moans) to SetActive(false), and when I unpause to SetActive(true). I have it all done besides the part where It grabs the moaning sound and disables it. How do I use it? Getcomponent? No idea on my part, anything helps, Thank you! I could also just do AudioListener = 0 (which I do for the mute function when you press M) and it works, but if you are muted, then pause, then unpause, it makes you not muted anymore which is a problem hence why I'm using setActive instead. ps: Also if you know anything about making a sensitivity slider please inform me!
My pause script is in C#.
Answer by Luettgen · Aug 28, 2021 at 09:38 AM
I have this quiz game that runs with series of 5 questions per category. I want to add an audio when the user pressed the correct answer or incorrect answer. How can i make is possible that when i press the incorrect or correct answer an audio file will play?,I have this quiz game that runs with series of 5 questions per category. I want to add an audio when the user pressed the correct answer or incorrect answer. How can i make is possible that when i press the incorrect or correct answer an audio file will play?
Your answer
Follow this Question
Related Questions
Unity 5 and Multiple AudioListeners 2 Answers
How to mute Backgroundmusic while other audiosources still plays 0 Answers
How to get C# Array to Load into Audio Source 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers