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

        //点击屏幕自对对焦
#if UNITY_EDITOR
if(!EventSystem.current.IsPointerOverGameObject()&&Input.GetMouseButtonUp())
#elif UNITY_ANDROID || UNITY_IPHONE
if (!EventSystem.current.IsPointerOverGameObject()&& Input.touchCount > && Input.GetTouch().phase == TouchPhase.Began)
#endif
{
Vuforia.CameraDevice.Instance.SetFocusMode(Vuforia.CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
}
EventSystem.current.IsPointerOverGameObject()为判断是否点击在当前UI上
上一篇:ERROR 1045 (28000): Access denied for user 'xxx'@'localhost' (using password: YES)【奇葩的bug】


下一篇:有趣的线段树模板合集(线段树,最短/长路,单调栈,线段树合并,线段树分裂,树上差分,Tarjan-LCA,势能线段树,李超线段树)