does anybody know how i would go about putting my instantiated objects into my array? cause i have no clue. with the normal javascript array you would just use .add, but with this one i have no clue how to put a transform into my array? help?
var instantiateObject : Transform;
var gridX = 10;
var gridY = 10;
function Start () {
//create two new arrays for the x and y axis
var map = new String[gridX,gridY];
for ( var x = 0; x < gridX; x++){
for (var y = 0; y < gridY; y++){
var myName = Instantiate(instantiateObject, Vector3(x *.5,0,y * .5), Quaternion.identity);
myName.name = "x: " + x + "y: " + y;
map = myName.name;
}
}
print(map[0,0]);
}