Hi!
I’m currently scripting the UI to my game and I want to adjust the volume with a slider. Therefor I have an AudioMixer with two groups - for sfxVolume & musicVolume. I created a slider for each group. Then, I wrote two functions to call from the slider:
public void SetMusicLevel(float musicLvl)
{
main_Mixer.SetFloat("musicVol", musicLvl);
}
public void SetSfxLevel(float sfxLevel)
{
main_Mixer.SetFloat("sfxVol", sfxLevel);
}
When I now want to call these on the slider on the OnValueChanged Event, the following thing appears, which wasn’t there in prior Unity versions:
When I start the game and try to adjust the mixerGroup Volume, it always jumps to the value i marked in the image, zero (Assuming that my startValue of the slider is not 0, of course, unlike shown in the image…). So it is not passing the slider value to the function but this certain one.
Is there any way to fix this?
I should have everything else set up correctly as I followed this tutorial:
link text
Thanks!