- Home /
Question by
firasdeep · Oct 20, 2011 at 05:35 PM ·
javascripterrortransform
BCE0019: 'Add' is not a member of 'UnityEngine.Transform[]'
plz help >>>>>>
Assets/Wall/Walls.js(10,25): BCE0019: 'Add' is not a member of 'UnityEngine.Transform[]'
var wallpreba : Transform; var myArray : Transform[];
function Start () {
var go : GameObject[] = GameObject.FindGameObjectsWithTag("wall");
for (var wall : GameObject in go)
{
Instantiate(wallpreba, wall.transform.position, wallpreba.transform.rotation);
myArray.Add(wall);
}
}
Comment
Best Answer
Answer by Eric5h5 · Oct 20, 2011 at 06:20 PM
Built-in arrays are not resizable and don't have any Add functions or the like.