gameobject's position unity code example
Example 1: get position of any gameobject in unity
GameObject.Find("Your_Name_Here").transform.position;
Example 2: how to reference the position of a game object unity
private Transform player;
private void Start()
{
player = GameObject.Find("Player").transform;
}