how to get the x position of an object in unity code example Example: unity get x position float x = transform.position.x;