Find position of the GameObject this script is attached to.

Hi,

How can I find position of the GameObject a script is attached to?

Thanks.

function Update()
{
Debug.Log (gameObject.transform.position);
}

You mean the like you have a cube with a script and in this script you wanna use the position of the cube? In that case it would just be transform.position.
Or did I missunderstood your question?