How to mark an instantiated object so i can move it later?

I have a script that instantiates an object when the key e is pressed. then it will move the object to the point of a raycast im shooting after, and then when you right click it finalizes the object in its place and u can spawn more. The PROBLEM im having is when i instantiate the object, im not sure how to go back and call on the specific object they spawned, as they will be spawning many objects. Much help would be apriciated, ik its hard to explain heres the script(ps i am a messy coder):

var CheckTag : String = "placeabletag"; //tag where checking for

var dontCheck : boolean = false; //used if we dont want to check the tag of the object the raycast hit

var eObject : Transform;

var raycastDist : float = 30.0;

var hold : boolean;

var hitlayer : int = 8;

var whichspawned;

var storeRayInfo : RaycastHit;  //stores the info from the raycast for use of positioning the instantiated object

function Update(){

if(hold){

var moveToHere : boolean;

var storeRayInfo2 : RaycastHit;

moveToHere = Physics.Raycast(transform.position, transform.forward, storeRayInfo2, raycastDist);

if(moveToHere){
eObject.transform.position = storeRayInfo2.point;  //eOject is my prefab transform im //guessing it is not properly linking the item i instantiated?
}//end of if found hit braket
if (Input.GetMouseButton(1)) {
      hold = false;
   }//end of mouse click braket
}//end of if hold braket




if(Input.GetKey("e")){

spawnObjectHold();

}//end of Input"e" braket

}//end of Update function braket




function spawnObjectHold(){
if(!hold){


var foundHit : boolean = false; //used to check if raycast hit something


if(dontCheck){

foundHit = Physics.Raycast(transform.position,transform.forward,storeRayInfo, raycastDist);

}//end of dontcheck if statement braket

if(!dontCheck){
foundHit = Physics.Raycast(transform.position,transform.forward,storeRayInfo, raycastDist, hitlayer);
}//end of !dontcheck if statement braket

if(foundHit){

Instantiate(eObject, storeRayInfo.point, Quaternion.LookRotation(storeRayInfo.normal));
hold = true;
}//end of if statement braket
}//end of hold if statement
}//end of function braket

A bit of a guess concerning what you want here. Assume you had a variable at the top of the file declared like this:

var lastInstantiated : GameObject;

Then when you do your Instantiate:

lastInstantiated = Instantiate(eObject, storeRayInfo.point, Quaternion.LookRotation(storeRayInfo.normal)) as GameObject;

Now at some future time you can use ‘lastInstantiated’ to manipulate the last instantiated game object. If you have more than one, you will need to save them in a List or other collection type.