how to find a gameobjects position in 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;
}
Example 3: get position of gameobject unity
GameObject.FindGameObjectWithTag("Your_Tag_Here").transform.position;