SvrDebugOverrideSettings.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SvrDebugOverrideSettings : MonoBehaviour {
  5. // Update is called once per frame
  6. void Update ()
  7. {
  8. if (Input.GetKeyDown(KeyCode.Alpha1)) { SvrOverrideSettings.EyeAntiAliasing = SvrOverrideSettings.eAntiAliasing.k1; }
  9. if (Input.GetKeyDown(KeyCode.Alpha2)) { SvrOverrideSettings.EyeAntiAliasing = SvrOverrideSettings.eAntiAliasing.k2; }
  10. if (Input.GetKeyDown(KeyCode.Alpha3)) { SvrOverrideSettings.EyeAntiAliasing = SvrOverrideSettings.eAntiAliasing.k4; }
  11. if (Input.GetKeyDown(KeyCode.Q)) { SvrOverrideSettings.EyeResolutionScaleFactor = 0.25f; }
  12. if (Input.GetKeyDown(KeyCode.W)) { SvrOverrideSettings.EyeResolutionScaleFactor = 0.5f; }
  13. if (Input.GetKeyDown(KeyCode.E)) { SvrOverrideSettings.EyeResolutionScaleFactor = 0.75f; }
  14. if (Input.GetKeyDown(KeyCode.R)) { SvrOverrideSettings.EyeResolutionScaleFactor = 1.0f; }
  15. if (Input.GetKeyDown(KeyCode.T)) { SvrOverrideSettings.EyeResolutionScaleFactor = 1.25f; }
  16. if (Input.GetKeyDown(KeyCode.Y)) { SvrOverrideSettings.EyeResolutionScaleFactor = 1.5f; }
  17. if (Input.GetKeyDown(KeyCode.A)) { SvrOverrideSettings.MasterTextureLimit = SvrOverrideSettings.eMasterTextureLimit.k0; }
  18. if (Input.GetKeyDown(KeyCode.S)) { SvrOverrideSettings.MasterTextureLimit = SvrOverrideSettings.eMasterTextureLimit.k1; }
  19. if (Input.GetKeyDown(KeyCode.D)) { SvrOverrideSettings.MasterTextureLimit = SvrOverrideSettings.eMasterTextureLimit.k2; }
  20. if (Input.GetKeyDown(KeyCode.F)) { SvrOverrideSettings.MasterTextureLimit = SvrOverrideSettings.eMasterTextureLimit.k3; }
  21. if (Input.GetKeyDown(KeyCode.G)) { SvrOverrideSettings.MasterTextureLimit = SvrOverrideSettings.eMasterTextureLimit.k4; }
  22. if (Input.GetKeyDown(KeyCode.U)) { SvrOverrideSettings.CpuPerfLevel = SvrOverrideSettings.ePerfLevel.Minimum; }
  23. if (Input.GetKeyDown(KeyCode.I)) { SvrOverrideSettings.CpuPerfLevel = SvrOverrideSettings.ePerfLevel.Medium; }
  24. if (Input.GetKeyDown(KeyCode.O)) { SvrOverrideSettings.CpuPerfLevel = SvrOverrideSettings.ePerfLevel.Maximum; }
  25. if (Input.GetKeyDown(KeyCode.P)) { SvrOverrideSettings.CpuPerfLevel = SvrOverrideSettings.ePerfLevel.System; }
  26. if (Input.GetKeyDown(KeyCode.H)) { SvrOverrideSettings.GpuPerfLevel = SvrOverrideSettings.ePerfLevel.Minimum; }
  27. if (Input.GetKeyDown(KeyCode.J)) { SvrOverrideSettings.GpuPerfLevel = SvrOverrideSettings.ePerfLevel.Medium; }
  28. if (Input.GetKeyDown(KeyCode.K)) { SvrOverrideSettings.GpuPerfLevel = SvrOverrideSettings.ePerfLevel.Maximum; }
  29. if (Input.GetKeyDown(KeyCode.L)) { SvrOverrideSettings.GpuPerfLevel = SvrOverrideSettings.ePerfLevel.System; }
  30. if (Input.GetKeyDown(KeyCode.Z)) { SvrOverrideSettings.ChromaticAberrationCorrection = SvrOverrideSettings.eChromaticAberrationCorrection.kDisable; }
  31. if (Input.GetKeyDown(KeyCode.X)) { SvrOverrideSettings.ChromaticAberrationCorrection = SvrOverrideSettings.eChromaticAberrationCorrection.kEnable; }
  32. if (Input.GetKeyDown(KeyCode.C)) { SvrOverrideSettings.VSyncCount = SvrOverrideSettings.eVSyncCount.k1; }
  33. if (Input.GetKeyDown(KeyCode.V)) { SvrOverrideSettings.VSyncCount = SvrOverrideSettings.eVSyncCount.k2; }
  34. if (Input.GetKeyDown(KeyCode.M)) { SvrOverrideSettings.FoveateArea = Mathf.Clamp(SvrOverrideSettings.FoveateArea + 0.1f, 0f, 1f); Debug.LogFormat("FoveateArea: {0}", SvrOverrideSettings.FoveateArea); }
  35. if (Input.GetKeyDown(KeyCode.N)) { SvrOverrideSettings.FoveateArea = Mathf.Clamp(SvrOverrideSettings.FoveateArea - 0.1f, 0f, 1f); Debug.LogFormat("FoveateArea: {0}", SvrOverrideSettings.FoveateArea); }
  36. if (Input.GetKeyDown(KeyCode.Period)) { SvrOverrideSettings.FoveateGain = SvrOverrideSettings.FoveateGain + Vector2.one; Debug.LogFormat("FoveateGain: {0}", SvrOverrideSettings.FoveateGain); }
  37. if (Input.GetKeyDown(KeyCode.Comma)) { SvrOverrideSettings.FoveateGain = SvrOverrideSettings.FoveateGain - Vector2.one; Debug.LogFormat("FoveateGain: {0}", SvrOverrideSettings.FoveateGain); }
  38. }
  39. }