Raycast examples needed - alternative to OnMouseDown, OnMouseUp

I’m looking for some examples or tutorials that show how to use raycast as a replacement for OnMouseDown and OnMouseUp in mobile apps.

You have some information and examples about touches in mobile devices in the Reference Manual. The code below is based on one of those examples, and fills a RaycastHit structure with information about the object touched:

function Update () {
  var touch = Input.GetTouch[0];
  if (touch.phase == TouchPhase.Began) { // if touch started...
      // Construct a ray from the current touch coordinates
      var ray = Camera.main.ScreenPointToRay (touch.position);
      var hit: RaycastHit;
      if (Physics.Raycast (ray, hit)) {
        // hit contains information about the object clicked
        // like hit.transform etc.
      }
    }
  }
}