Spawn object

So I asked about this before, and thought that I knew what I was doing but then i got side tracked and did a bunch of other stuff and when it came back it I couldn’t figure it out, so i know your probably going to frown at me but i need help here again, my script is below, but I know im making an obvious mistake but i dont know what to do, how do i declare the Items? i thought i would do it in the Inspector, but now im not sure

var GameObject = new Array(5);
GameObject[0] = GameObject; 
GameObject[1] = GameObject; 
GameObject[2] = GameObject; 
GameObject[3] = GameObject; 
GameObject[4] = GameObject;

function Start () {



function Update () {


var myArray : GameObject = new GameObject[5];

then to initialize, you could simply drag and drop in the inspector, or use GameObject.FindGameObjectsWithTag or something similar to initialize dynamically…

you can access the members as:

myArray[0] , myArray[1] , etc…


myArray[0] = GameObject.FindWithTag(“Player”);

…(for example)