Detect an Input.GetTouch in form of a Square/Quadrangle

Hey Guys =)

I want to instantiate a Gameobject whenever the Device gets a touch input in form of a Square.
I have this Script that Instantiates an Object whenever the User touches the Screen at all:

var newObject : GameObject;
function Update () {
for (var i = 0; i < Input.touchCount; ++i) {
if (Input.GetTouch(i).phase == TouchPhase.Began) {
clone = Instantiate (newObject, transform.position, transform.rotation);
}
}

but I need a script that detects if the user touches a quad onto the Screen so that then an Object gets Instantiated.

Every answer will be Highly appreciated and thx for reading =)

I would use Ray casting and perhaps tag all of your squares the same tag. So if a ray hits your touch position with the tag name of “square” or whatever then it will detect that the object should be instantiated. This should help get you going in the right direction:

var ray = Camera.main.ScreenPointToRay (Input.GetTouch);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit)){ ...