In Unity3d How detect touch on UI or not?
For mobile you need to pass the id of the Touch to IsPointerOverGameObject
foreach (Touch touch in Input.touches)
{
int id = touch.fingerId;
if (EventSystem.current.IsPointerOverGameObject(id))
{
// ui touched
}
}