OVRModeParms.cs 591 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using UnityEngine;
  3. public class OVRModeParms : MonoBehaviour
  4. {
  5. private void Start()
  6. {
  7. if (!OVRManager.isHmdPresent)
  8. {
  9. base.enabled = false;
  10. return;
  11. }
  12. base.InvokeRepeating("TestPowerStateMode", 10f, 10f);
  13. }
  14. private void Update()
  15. {
  16. if (OVRInput.GetDown(this.resetButton, OVRInput.Controller.Active))
  17. {
  18. OVRPlugin.cpuLevel = 0;
  19. OVRPlugin.gpuLevel = 1;
  20. }
  21. }
  22. private void TestPowerStateMode()
  23. {
  24. if (OVRPlugin.powerSaving)
  25. {
  26. Debug.Log("POWER SAVE MODE ACTIVATED");
  27. }
  28. }
  29. public OVRInput.RawButton resetButton = OVRInput.RawButton.X;
  30. }