- Home /
Why does my music not work with my volume control slider?
I have built a slider that controls the volume of all the sound effects of a project I am working on. The slider works terrific and the volume of all sound effects fades in and out as they should.
Unfortunately, when I drop a music file into the scene, it does not fade in or out. All the sound effects continue to fade out properly, but music stays the same level throughout.
Are there certain settings music audio needs to be set to in the inspector in order to get it to function properly? Thanks!
Answer by hero_kenshin · Mar 27, 2014 at 09:49 PM
What is your slider script?
Also have you referenced the music file via script?
Answer by screenname_taken · Mar 27, 2014 at 09:50 PM
Could you post your script? I also control sounds and music volume with sliders and the script for the sliders is the same.
Answer by Reckmen · Mar 27, 2014 at 11:29 PM
Did you apply the slider script to music slider you have imported?
Answer by mechangel · Jan 15, 2016 at 08:57 AM
I was having this problem working with Audio Mixers and volume sliders. The problem was sneaky; you have to choose the Exposed parameter from "Dynamic Floats" in the script attach dropdown on the slider, not the class in the script that handles the music fading.
Your answer
![](https://koobas.hobune.stream/wayback/20220613141339im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Audio Source will not "unmute" after toggling? 2 Answers
Unintended audio gaps 1 Answer
Music will not change when an event triggers it 3 Answers
Stream music in Unity mobile 0 Answers
Playing Music Problem. 2 Answers