How I change position by button

Hello… How I change position of object in the form by button in another form through assignment
the form of object?

If it were me, this is how I’d do it:

using UnityEngine;
using System.Collections;

public class MoveObjectWithButton : MonoBehaviour {
	public Transform position1;
	public Transform position2;
	public Transform myObject;
	// Use this for initialization
	void Start () {
	myObject.transform.position = position1.transform.position;
	}

	void OnGUI(){
		if (GUI.Button (new Rect (10, 70, 50, 30), "Position 1")) {
			myObject.transform.position = position1.transform.position;
			
		}
		if (GUI.Button (new Rect (10, 140, 50, 30), "Position 2")) {
			myObject.transform.position = position2.transform.position;

				}
	}
}