After a bit of investigation, it looks like Unity has decided to change how Input.multiTouchEnabled works.
It now returns true on everything I've tried it on, even my macbook which clearly doesn't have a multitouch display.
Using this makes it work:
bool resolvedHit = false;
#if !UNITY_FLASH
if (Input.multiTouchEnabled)
{
for (int i = 0; i < Input.touchCount; ++i)
{
Touch touch = Input.GetTouch(i);
if (touch.phase != TouchPhase.Began) continue;
Ray ray = viewCamera.ScreenPointToRay(touch.position);
RaycastHit hitInfo;
if (collider.Raycast(ray, out hitInfo, 1.0e8f))
{
if (!Physics.Raycast(ray, hitInfo.distance - 0.01f))
{
StartCoroutine(coHandleButtonPress(touch.fingerId));
resolvedHit = true;
break; // only one finger on a buton, please.
}
}
}
}
#endif
if (!resolvedHit)
{
if (Input.GetMouseButtonDown(0))
{
Ray ray = viewCamera.ScreenPointToRay(Input.mousePosition);
RaycastHit hitInfo;
if (collider.Raycast(ray, out hitInfo, 1.0e8f))
{
if (!Physics.Raycast(ray, hitInfo.distance - 0.01f))
StartCoroutine(coHandleButtonPress(-1));
}
}
}
In any case, I strongly recommend using the tk2dUIButton - its far more efficient to use and much more customizable, and this thing has been more or less deprecated (reminds me I need to replace them in the demos). Check out the tk2dUI demo.