How to set a Mixer's volume to a slider's volume in Unity?
问题 I'm trying to make some audio settings. Here is my script: 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); } It