Relevant bits of code:
private var backgrounds:Array[];
function Start() {
backgrounds = new Array[backgroundPrefabs.length];
for(var i:int = 0; i<backgroundPrefabs.length; i++){
backgrounds _= new Transform[GetNumBackgroundsNeeded(backgroundPrefabs*)];*_
_ leftMostBG = 0;
for(var j:int = 0; j<backgrounds*.length; j++){ // MAKE SURE PIVOT IS BOTTOM LEFT*
backgrounds[j] = Instantiate(backgroundPrefabs*, new Vector3(xMin +
(backgroundPrefabs.GetComponent.().sprite.bounds.size.x * backgroundPrefabs.localScale.x * j), yMin, 0), Quaternion.identity);
}
}
}*
So, at this point, as far as I know I have an Array of Transform arrays, but when I do this:
backgrounds[a].position.x -=dx * Time.deltaTime * speed;
I get BCE0019: ‘position’ is not a member of ‘Object’, which indicates that the Transform arrays are somehow not correctly typed…how can I fix this?_