private void ChangeQualityLevel(UIGenericSlider slider, float newValue) { var quality = (int)newValue; QualitySettings.SetQualityLevel(quality); QualitySettings.shadowDistance = _shadowDist[quality]; QualitySettings.lodBias = _lodBias[quality]; slider.SetText(QualitySettings.names[quality]); }
private void UpdateShadowCascades(UIGenericSlider slider, float cascades) { var c = Mathf.RoundToInt(cascades); if (c == 1) { c = 2; } else if (c == 3) { c = 4; } QualitySettings.shadowCascades = c; }
private void UpdateShadowDistance(UIGenericSlider slider, float dist) { QualitySettings.shadowDistance = dist; }
private void ChangeFov(UIGenericSlider slider, float newValue) { Player.Cam.fieldOfView = newValue; }
private void UpdateVolume(UIGenericSlider slider, float newValue) { AudioListener.volume = newValue; slider.SetText(AudioListener.volume.ToString("F1")); }