title: How to know when a user is holding an UI button?
body: <p>It's pretty easy to detect a button OnClick event, however I can't figure out how to detect when a using started and stopped touching a button. How can this be done?</p>
  
  <p>This is what I'm trying right now:</p>
  
  <pre><code>public class Touching : MonoBehaviour {
      public static bool mouseDown;
      public float timeMouseDown;
  
      void Update(){
          if (mouseDown) {
              timeMouseDown += 1;
              Debug.Log ("meditar");
          }
      }
  
      public void OnPointerDown(PointerEventData eventData){
          Debug.Log ("OnPointerDown");
          mouseDown = true;
      }
  
      public void OnPointerUp(PointerEventData eventData){
          Debug.Log ("OnPointerUp");
          mouseDown = false;
          timeMouseDown = 0;
      }
  }
  </code></pre>