FoveationTest.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using SC.XR.Unity.Module_InputSystem.InputDeviceGC;
  5. using SC.XR.Unity.Module_InputSystem;
  6. using UnityEngine.UI;
  7. using TMPro;
  8. using System;
  9. public class FoveationTest : MonoBehaviour
  10. {
  11. public Toggle toggle;
  12. public Slider GainX;
  13. public Slider GainY;
  14. public Slider Area;
  15. public Slider Min;
  16. public TextMeshProUGUI toggleText;
  17. public TextMeshProUGUI GainXText;
  18. public TextMeshProUGUI GainYText;
  19. public TextMeshProUGUI AreaText;
  20. public TextMeshProUGUI MinText;
  21. // Update is called once per frame
  22. void Update()
  23. {
  24. //if (API_GSXR_Slam.SlamManager == null || API_GSXR_Slam.SlamManager.IsRunning == false)
  25. // return;
  26. //if (toggle) {
  27. // API_GSXR_Slam.SlamManager.settings.foveationGain = Vector2.zero;
  28. // API_GSXR_Slam.SlamManager.settings.foveationArea = 0;
  29. // //toggleText.text = GSXRPluginAndroid.A_foveationGainX.ToString();
  30. //}
  31. //if (GainX) {
  32. // API_GSXR_Slam.SlamManager.settings.foveationGain.x = GainX.value;
  33. // GainXText.text = "GainX:" + API_GSXR_Slam.SlamManager.settings.foveationGain.x.ToString();
  34. //}
  35. //if (GainY) {
  36. // API_GSXR_Slam.SlamManager.settings.foveationGain.y = GainY.value;
  37. // GainYText.text = "GainY:" + API_GSXR_Slam.SlamManager.settings.foveationGain.y.ToString();
  38. //}
  39. //if (Area) {
  40. // API_GSXR_Slam.SlamManager.settings.foveationArea = Area.value;
  41. // AreaText.text = "Area:" + API_GSXR_Slam.SlamManager.settings.foveationArea.ToString();
  42. //}
  43. //if (Min) {
  44. // API_GSXR_Slam.SlamManager.settings.foveationMinimum = (1.0f / (float)Math.Pow(2, Min.value));
  45. // MinText.text = "Min:" + API_GSXR_Slam.SlamManager.settings.foveationMinimum.ToString();
  46. //}
  47. }
  48. }