unity set position of gameobject code example
Example 1: unity set position
// To set the position of a gameobject use the following
GameObject.transform.position = new Vector3(x, y, z);
Example 2: how to change the position of a gameobject in c# unity
Vector3 pos = transform.position;
pos.x = 12;
transform.position = pos;
Example 3: get position of gameobject unity
GameObject.FindGameObjectWithTag("Your_Tag_Here").transform.position;