12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using UnityEngine;
- namespace EZXR.Glass.Core
- {
- public class SystemUICommu : MonoBehaviour
- {
- bool lastRayState_L = false;
- bool lastRayState_R = false;
- // Start is called before the first frame update
- void Start()
- {
- }
- // Update is called once per frame
- void Update()
- {
- //if (InputSystem.leftHand == null || InputSystem.rightHand == null)
- //{
- // return;
- //}
- //if (lastRayState_L != InputSystem.leftHand.IsRayContacting || lastRayState_R != InputSystem.rightHand.IsRayContacting)
- //{
- // if (InputSystem.leftHand.IsRayContacting || InputSystem.rightHand.IsRayContacting)
- // {
- // Utilities.Android.SendIntent("ToSystem", "com.ezxr.glass.systemui", "RayState", "False");
- // }
- // else
- // {
- // Utilities.Android.SendIntent("ToSystem", "com.ezxr.glass.systemui", "RayState", "True");
- // }
- // lastRayState_L = InputSystem.leftHand.IsRayContacting;
- // lastRayState_R = InputSystem.rightHand.IsRayContacting;
- //}
- }
- private void OnApplicationPause(bool pause)
- {
- if (!pause)
- {
- Utilities.Android.SendIntent("ToSystem", "com.ezxr.glass.systemui", "RefreshHandState", "");
- }
- }
- }
- }
|