public void OnUpdate() { //Code to execute whenever a graphics update occurs //See RazerChroma.cs RazerChroma.Init(); RazerChroma.UpdateColors(); //Custom refresh rate cap - Sets the game's maximum refresh rate to whatever is defined in the config. if (Application.targetFrameRate != targetFramerate) { oldTargetFramerate = Application.targetFrameRate; Application.targetFrameRate = targetFramerate; Console.WriteLine("[" + Name + "] Set maximum framerate to " + targetFramerate + ", old framerate was " + oldTargetFramerate); } if (QualitySettings.vSyncCount != vSyncCount) { oldVSyncCount = QualitySettings.vSyncCount; QualitySettings.vSyncCount = vSyncCount; Console.WriteLine("[" + Name + "] Set V-Sync count to " + vSyncCount + ", old framerate was " + oldVSyncCount); ConfigVariable.SetInt("QualitySettings", "VSyncCount", vSyncCount); } if (anisotropicFiltering == "disable" && QualitySettings.anisotropicFiltering == AnisotropicFiltering.Enable || QualitySettings.anisotropicFiltering == AnisotropicFiltering.ForceEnable) { QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable; Console.WriteLine("[" + Name + "] Disabled Anisotropic Filtering"); } if (anisotropicFiltering == "enable" && QualitySettings.anisotropicFiltering == AnisotropicFiltering.Disable || QualitySettings.anisotropicFiltering == AnisotropicFiltering.ForceEnable) { QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable; Console.WriteLine("[" + Name + "] Enabled Anisotropic Filtering"); } if (anisotropicFiltering == "forceenable" && QualitySettings.anisotropicFiltering == AnisotropicFiltering.Disable || QualitySettings.anisotropicFiltering == AnisotropicFiltering.Enable) { QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable; Console.WriteLine("[" + Name + "] Force-enabled Anisotropic Filtering"); } }