unity get position x of element code example Example: unity get x position float x = transform.position.x;