/** * Applies current settings to QualitySettings */ virtual protected void UpdateGraphicsSettings() { SmartUI.ShowGuiBounds = Settings.Advanced.ShowGuiBounds; SmartUI.ShowGuiMaterial = Settings.Advanced.ShowGuiMaterial; if (SoundManager.MusicVolume != Settings.General.MusicVolumeDB) { SoundManager.MusicVolume = Settings.General.MusicVolumeDB; Trace.Log("Music Volume to: " + Settings.General.MusicVolumeDB); } if (SoundManager.Volume != Settings.General.SFXVolumeDB) { SoundManager.Volume = Settings.General.SFXVolumeDB; Trace.Log("SFX Volume to: " + Settings.General.SFXVolumeDB); } if (GuiContainer.ENABLE_CACHING != Settings.Advanced.GuiCaching) { Trace.Log("Gui Caching " + Settings.Advanced.GuiCaching); GuiContainer.ENABLE_CACHING = (Settings.Advanced.GuiCaching); GuiContainer.InvalidateAll(); } if (ResourceManager.UsingHighDPIGui != Settings.Advanced.UseHighDPIGui) { Trace.Log("HighDPI GUI changed to: " + Settings.Advanced.UseHighDPIGui); ResourceManager.UsingHighDPIGui = Settings.Advanced.UseHighDPIGui; } if (QualitySettings.GetQualityLevel() != Settings.General.UnityQualityLevel) { Trace.Log("Quality set to: " + QualitySettings.names[Settings.General.UnityQualityLevel]); ApplyQualityLevel(Settings.General.UnityQualityLevel); } if (isAAEnabled != Settings.General.EnableAntiAliasing) { Trace.Log("AA changed to: " + Settings.General.RawAALevel + " (from " + QualitySettings.antiAliasing + ")"); ApplyAntiAliasing(Settings.General.RawAALevel); } if (isSSAOEnabled != Settings.General.EnableSSAO) { Trace.Log("SSAO set to: " + Settings.General.EnableSSAO); ApplySSAO(Settings.General.EnableSSAO); } if (QualitySettings.anisotropicFiltering != Settings.General.AnisotropicFiltering) { Trace.Log("Anistropic filtering change to: " + Settings.General.AnisotropicFiltering); QualitySettings.anisotropicFiltering = Settings.General.AnisotropicFiltering; } if (QualitySettings.vSyncCount != Settings.General.vSyncCount) { Trace.Log("vSync to: " + Settings.General.vSyncCount); QualitySettings.vSyncCount = Settings.General.vSyncCount; } if (Application.targetFrameRate != Settings.Advanced.TargetFrameRate) { Trace.Log("Framerate changed to: " + Settings.Advanced.TargetFrameRate); Application.targetFrameRate = Settings.Advanced.TargetFrameRate; Settings.General.EnablevSnyc = false; // vsync must be disabled for target frame rate to work. } if (FXStyle != Settings.General.FXStyle) { Trace.Log("Applying FX style [{0}] ", Settings.General.FXStyle); ApplyFXStyle(Settings.General.FXStyle); } }