Anomalydetection.cs 673 B

1234567891011121314151617181920212223242526272829303132
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. namespace Ximmerse.XR.Utils
  4. {
  5. /// <summary>
  6. /// Anomaly detection
  7. /// </summary>
  8. public class Anomalydetection : SvrEventMonitor
  9. {
  10. [SerializeField]
  11. private Text warningText;
  12. [SerializeField]
  13. private float keepTime = 2.0f;
  14. private void OnEnable()
  15. {
  16. if (warningText != null)
  17. {
  18. //warningText.enabled = false;
  19. warningText.color = Color.green;
  20. warningText.text = "";
  21. }
  22. }
  23. private void Update()
  24. {
  25. Inspect(warningText, keepTime);
  26. }
  27. }
  28. }