Vuforia点击屏幕自动对焦,过滤UGUI的按钮

        //点击屏幕自对对焦
#if UNITY_EDITOR
        if(!EventSystem.current.IsPointerOverGameObject()&&Input.GetMouseButtonUp(0))
#elif UNITY_ANDROID || UNITY_IPHONE
        if (!EventSystem.current.IsPointerOverGameObject()&& Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
#endif
        {
            Vuforia.CameraDevice.Instance.SetFocusMode(Vuforia.CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
        }
EventSystem.current.IsPointerOverGameObject()为判断是否点击在当前UI上
原文地址:https://www.cnblogs.com/townsend/p/4233130.html