I am trying to loop on every materials to change the color but I only arrive to the “Starting” message and, without an error, I do not get the “array length” message. Please help. The code:
private var r : Renderer[];
function Start () {
Debug.Log("Starting");
r = gameObject.GetComponentsInChildren(Renderer,true);
Debug.Log("Array lenght:" + r.Length);
for (var m : Renderer in r) {
m.material.color.a=0;
}
}
Thanks to whydidoit for the missing dot! And to Fabio, could you mark this question as answered please, sir?
– iwaldrop