// Resets volume sliders public void ResetVolumeSliders() { foreach (Slider slider in volumeSliders) { string[] nameParts = slider.name.Split(' '); string sliderName = nameParts[0]; sliderName = sliderName.ToLower(); settingsPanel.DoVolumeReflection(field => { if (field.Name.Equals(sliderName)) { float value = (float)field.GetValue(settingsPanel.GetVolumes()); slider.value = value; } }); } }