iOS OnMouseDown equivalent

Hey all,

Just finished a book about Unity (desktop version) and now I’d like to target the iPhone.

A very basic issue I’m having is with touches… For example,

How would I get the following to work on the iPhone with, say, OnTouchDown?

function OnMouseDown()
{
	accelerating = true;
}

function OnMouseUp()
{
	accelerating = false;
}

I’ve seen “Input.touchCount”, but I want to know if the user is touching my GUI texture specifically.

I believe you have to to use TouchPhases. You can start tracking with TouchPhase.Began and then give whatever special attention to your specific cases (TouchPhase.Moved, TouchPhase.Stationary ...)