private void OverrideMsaa() { switch (SaveSettings.MsaaIni) { case 0 when QualitySettings.antiAliasing != 0: DisableMsaa(); break; case 1 when QualitySettings.antiAliasing != 2: TwoMsaa(); break; case 2 when QualitySettings.antiAliasing != 4: FourMsaa(); break; case 3 when QualitySettings.antiAliasing < 8: EightMsaa(); break; } if (msaaDropdown.value == SaveSettings.MsaaIni) { return; } EventExtension.MuteEventListener(msaaDropdown.onValueChanged); msaaDropdown.value = SaveSettings.MsaaIni; EventExtension.UnMuteEventListener(msaaDropdown.onValueChanged); }
private void OverrideFullscreen(bool b) { EventExtension.MuteEventListener(fullScreenToggle.onValueChanged); fullScreenToggle.isOn = b; ToggleFullScreen(b); EventExtension.UnMuteEventListener(fullScreenToggle.onValueChanged); }
private void OverrideFpsDisplay(bool b) { EventExtension.MuteEventListener(fpsDisplayToggle.onValueChanged); GameManager.Instance.SetDisplayFps(b); fpsDisplayToggle.isOn = b; SaveSettings.DisplayFpsIni = b; EventExtension.UnMuteEventListener(fpsDisplayToggle.onValueChanged); }
private void OverrideEffectsVolume() { if (_sfxSource != null && Math.Abs(_sfxSource.volume - SaveSettings.EffectVolumeIni) > 0f) { _sfxSource.volume = SaveSettings.EffectVolumeIni; } if (!(Math.Abs(effectsVolumeSlider.value - SaveSettings.EffectVolumeIni) > 0f)) { return; } EventExtension.MuteEventListener(effectsVolumeSlider.onValueChanged); effectsVolumeSlider.value = SaveSettings.EffectVolumeIni; EventExtension.UnMuteEventListener(effectsVolumeSlider.onValueChanged); }
private void OverrideBackgroundVolume() { if (_soundTrackSource != null && Math.Abs(_soundTrackSource.volume - SaveSettings.BackgroundVolumeIni) > 0f) { _soundTrackSource.volume = SaveSettings.BackgroundVolumeIni; } if (!(Math.Abs(backgroundVolumeSlider.value - SaveSettings.BackgroundVolumeIni) > 0f)) { return; } EventExtension.MuteEventListener(backgroundVolumeSlider.onValueChanged); backgroundVolumeSlider.value = SaveSettings.BackgroundVolumeIni; EventExtension.UnMuteEventListener(backgroundVolumeSlider.onValueChanged); }
private void OverrideMasterVolume() { if (Math.Abs(AudioListener.volume - SaveSettings.MasterVolumeIni) > 0f) { AudioListener.volume = SaveSettings.MasterVolumeIni; } if (!(Math.Abs(audioMasterVolumeSlider.value - SaveSettings.MasterVolumeIni) > 0f)) { return; } EventExtension.MuteEventListener(audioMasterVolumeSlider.onValueChanged); audioMasterVolumeSlider.value = SaveSettings.MasterVolumeIni; EventExtension.UnMuteEventListener(audioMasterVolumeSlider.onValueChanged); }
private void OverrideMasterTextureQuality() { if (QualitySettings.masterTextureLimit != SaveSettings.TextureLimitIni) { QualitySettings.masterTextureLimit = SaveSettings.TextureLimitIni; } if (!(Math.Abs(masterTexSlider.value - SaveSettings.TextureLimitIni) > 0f)) { return; } EventExtension.MuteEventListener(masterTexSlider.onValueChanged); masterTexSlider.value = SaveSettings.TextureLimitIni; EventExtension.UnMuteEventListener(masterTexSlider.onValueChanged); }
private void OverrideShadowCascade() { if (QualitySettings.shadowCascades != SaveSettings.ShadowCascadeIni) { QualitySettings.shadowCascades = SaveSettings.ShadowCascadeIni; } if (!(Math.Abs(shadowCascadesSlider.value - SaveSettings.ShadowCascadeIni) > 0f)) { return; } EventExtension.MuteEventListener(shadowCascadesSlider.onValueChanged); shadowCascadesSlider.value = SaveSettings.ShadowCascadeIni; EventExtension.UnMuteEventListener(shadowCascadesSlider.onValueChanged); }
private void OverrideAnisotropicFiltering() { if ((int)QualitySettings.anisotropicFiltering != SaveSettings.AnisotropicFilteringLevelIni) { QualitySettings.anisotropicFiltering = (AnisotropicFiltering)SaveSettings.AnisotropicFilteringLevelIni; } if (anisotropicDropdown.value == SaveSettings.AnisotropicFilteringLevelIni) { return; } EventExtension.MuteEventListener(anisotropicDropdown.onValueChanged); anisotropicDropdown.value = SaveSettings.AnisotropicFilteringLevelIni; EventExtension.UnMuteEventListener(anisotropicDropdown.onValueChanged); }
private void OverrideRenderDistance() { if (_myCamera == null) { return; } if (Math.Abs(_myCamera.farClipPlane - SaveSettings.RenderDistIni) > 0f) { _myCamera.farClipPlane = SaveSettings.RenderDistIni; } if (!(Math.Abs(renderDistSlider.value - SaveSettings.RenderDistIni) > 0f)) { return; } EventExtension.MuteEventListener(renderDistSlider.onValueChanged); renderDistSlider.value = SaveSettings.RenderDistIni; EventExtension.UnMuteEventListener(renderDistSlider.onValueChanged); }