'quack' is not a generic definition.
I'm getting the "BCE0138: 'quack' is not a generic definition" error. After some googling, it appears that it has something to do with var declaration, but I cant figure out what I'm doing wrong here.
This code is to get all child objects and disable them based on their layer.
var allChild = new Array (Transform);
function Start ()
{
allChild = gameObject.GetComponentsInChildren(Transform);
}
function Update()
{
for(var i :int = 0; i < allChild.length; i++)
{
if(allChild[i].gameObject.layer != 11)
{
allChild[i].gameObject.GetComponent.<Renderer>().enabled = false;
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Collision data stored in an array overwrites everything 0 Answers
How do I copy UV variables? 2 Answers
[help] Array index is out of range 0 Answers
Access variable of same script with many instances 1 Answer
Dinamically set array in shader 1 Answer