object pooling on exact place?

using UnityEngine;
using System.Collections;

public class ObjectPool : MonoBehaviour 
{
	GameObject[] projectiles = null;
	public int numberOfProjectilesToCreate = 0;

	
	// Use this for initialization
	void Start() 
	{
		projectiles = new GameObject[numberOfProjectilesToCreate];
		InstantiateProjectiles();
	}
	
	// Update is called once per frame
	void Update() 
	{
		
		{
			ActivateProjectile();
		}
		
	}
	
	private void InstantiateProjectiles()
	{
		for (int i = 0; i < numberOfProjectilesToCreate; i++)
		{
			projectiles *= Instantiate(Resources.Load("Prefab/PrefabCube")) as GameObject ;*

_ projectiles*.SetActiveRecursively(false);_
_
}_
_
}*_

* private void ActivateProjectile()*
* {*
* for (int i = 0; i < numberOfProjectilesToCreate; i++)*
* {*
_ if (projectiles*.active == false)
{
projectiles.SetActiveRecursively(true);
projectiles.GetComponent().Activate();
return;
}
}
}
}*

I used this and it is working…but i would like to make objects appear with exact distance between them so they don’t overlap(even if speed is increased during runtime).
Any help would be great since I’m new to code.
Thx :slight_smile:_

projectiles = Instantiate(Resources.Load(“Prefab/PrefabCube”)) as GameObject ;
projectiles*.transform.position = new Vector3 (x++, y, z);*
where x,y,z are floats which tell where they should appear.

thx for response :slight_smile:
i added

public float x;
public float y;
public float z;

and you line

projectiles*.transform.position = new Vector3 (x++, y, z);*

example:
when i set number of objects to 9 it changes x to 9
i can even change y and z
but nothing changes when i play it.
should i do something differently?
here is how it looks
[link text][1]

[1]: Screenshot by Lightshot