set object position unity code example
Example 1: set player position unity
transform.position = new Vector3(0, 0, 0);
Example 2: unity set position
GameObject.transform.position = new Vector3(x, y, z);
Example 3: unity c# transform position
GameObject myObject;
myObject.transform.position = new Vector3(x, y, z);
transform.position = new Vector3(x, y, z);
Debug.Log("x : " + myObject.transform.position.x);
Debug.Log("y : " + myObject.transform.position.y);
Debug.Log("z : " + myObject.transform.position.z);