public UnityEngine.EventSystems.EventSystem eventSystem=null;
//EventSystem执行比Input慢
private void LateUpdate(){
GameObject tempClickGobj=eventSystem.currentSelectedGameObject;
if(tempClickGobj!=null&&tempClickGobj==this.gameObject){
if(Input.GetMouseButtonDown(0)){
Debug.Log("Down|"+tempClickGobj);
}
if(Input.GetMouseButton(0)){
Debug.Log("Drag|"+tempClickGobj);
}
if(Input.GetMouseButtonUp(0)){
Debug.Log("Up|"+tempClickGobj);
}
}
}
//EventSystem执行比Input慢
private void LateUpdate(){
GameObject tempClickGobj=eventSystem.currentSelectedGameObject;
if(tempClickGobj!=null&&tempClickGobj==this.gameObject){
if(Input.GetMouseButtonDown(0)){
Debug.Log("Down|"+tempClickGobj);
}
if(Input.GetMouseButton(0)){
Debug.Log("Drag|"+tempClickGobj);
}
if(Input.GetMouseButtonUp(0)){
Debug.Log("Up|"+tempClickGobj);
}
}
}