Problem with touch and ui button


Just like the image above, we have a model and a canvas in front of it. It have collider at foots, and i need onclick event in the button also. What i want is the gameobject no action when user click button, but now it’s hard to click the button.

Here is my code below:

if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
			EventSystem es = EventSystem.current;
			if (es.IsPointerOverGameObject(Input.GetTouch(0).fingerId) && es.currentSelectedGameObject != null)
				Debug.Log("Handle touch === ");

Does someone has any ideas?

Not sure if this helps, but check this out, sounds familiar: