Here is my code:
@script RequireComponent( GUITexture )
private var gui : GUITexture;
function Start()
{
gui = GetComponent( GUITexture );
defaultRect= gui.pixelInset;
}
function Update()
{
var count = Input.touchCount;
for(var i : int = 0;i< count; i++)
{
var touch : Touch = Input.GetTouch(i);
if (gui.HitTest( touch.position ))
{
gui.pixelInset.x = touch.position.x;
gui.pixelInset.y = touch.position.y;
}
}
}
And here are the errors I get
Unknown identifier: default rect.
Any ideas?