- Home /
Change volume of objects with a tag
Hi!
I am making a slider were you can disable the music but you can also choose what music you want, so I have made 5 different GameObjects to get the music working. But now I want to make a slider in the options to disable the music. So the easiest way to do this is to change the volume of all the objects with that tag. But I don't know how to do it. If you can tell me how to do it, please do!
Thanks
What are you using to make the slider? Some plugin or manually using Unity's Input.Touch?
Don't put "fixed" in the title or edit a solution into the question.
If you found a solution, post an answer and accept it:
Or if you think this problem isn't worth to be included in this knowledge base, close the question. If you can't close it, post a comment and ask a moderator to close it.
Answer by Existingman · Jan 18, 2014 at 12:54 PM
Try using events. The controller object should broadcast the event when there is a change made and the music GameObjects should subscribe their volume changing methods to the event.
http://unity3d.com/learn/tutorials/modules/intermediate/scripting/events
Your answer
Follow this Question
Related Questions
Music play throughout all scenes? 1 Answer
Why is my backtrack's volume getting lower? 0 Answers
How to make volume continually go down in C#Script ? 1 Answer
Mute volume / sound problem 1 Answer
Decrease Volume 3 Answers