>>537879403
EventTrigger, OnPointerDown. Attach this to your UI gameObject.

OnPointerDown means the function will happen when you press your left mouse button. OnPointerUp means the function will happen when you release your left mouse button, after you press it