title: How to set a Mixer's volume to a slider's volume in Unity?
body: <p>I'm trying to make some audio settings. Here is my script:</p>
  
  <pre><code>public AudioMixer masterMixer;
  public float masterLvl;
  public float musicLvl;
  public float sfxLvl;
  
  public void SetMasterVolume ()
  {
      masterLvl = masterVolumeSlider.value;
      masterMixer.SetFloat("masterVol", masterLvl);
  }
  
  public void SetMusicVolume()
  {
      musicLvl = musicVolumeSlider.value;
      masterMixer.SetFloat("musicVol", musicLvl);
  }
  
  public void SetSfxVolume()
  {
      sfxLvl = sfxVolumeSlider.value;
      masterMixer.SetFloat("sfxVol", sfxLvl);
  }
  </code></pre>
  
  <p>It has all the OnValueChanged(); things on the sliders. I just want to know why this doesn't work. Thanks.</p>
  
  <p>EDIT: So the thing is that it changes the <strong>dB</strong>, not the volume. The new question is: How do I make it change the volume instead of dB?</p>
  
  <p>EDIT 2: Screenshot.
  <a href="https://i.stack.imgur.com/eWCVN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eWCVN.png" alt="audiomixer screenshot"></a></p>