Hi so as you can see i have this code down here VVVV How would i add say +1 number to the end of the name every time it is made so i can save them all in there current state in a .txt file for level creation and then saving the creation.
if(Input.GetKeyDown (KeyCode.Mouse0) && CanSpawn == true){
newPosition = new Vector3(objectPos.x, objectPos.y +1, objectPos.z);
//Debug.Log("Instantiate");
instance = (GameObject)Instantiate (_NONRIGIDCube,newPosition,Quaternion.identity)as GameObject;
instance.name = cubeName;