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", ""); } } } }