Check out example codes for "unity how to move an object to another object". It will help you in understanding the concepts better.

Code Example 1

// 3D
transform.position = new Vector3(GameObject.Find("Object").transform.position.x, GameObject.Find("Object").transform.position.y, GameObject.Find("Object").transform.position.z);

// 2D
transform.position = new Vector2(GameObject.Find("Object").transform.position.x, GameObject.Find("Object").transform.position.y);

Learn ReactJs, React Native from akashmittal.com