OVRChromaticAberration.cs 459 B

1234567891011121314151617181920212223
  1. using System;
  2. using UnityEngine;
  3. public class OVRChromaticAberration : MonoBehaviour
  4. {
  5. private void Start()
  6. {
  7. OVRManager.instance.chromatic = this.chromatic;
  8. }
  9. private void Update()
  10. {
  11. if (OVRInput.GetDown(this.toggleButton, OVRInput.Controller.Active))
  12. {
  13. this.chromatic = !this.chromatic;
  14. OVRManager.instance.chromatic = this.chromatic;
  15. }
  16. }
  17. public OVRInput.RawButton toggleButton = OVRInput.RawButton.X;
  18. private bool chromatic;
  19. }