hello!
I want transfer a unity project to iphone platform.
After I deal with all the #pragma strict and Getcomponent issue ,I found runtime error still happen:
the error message: NullReferenceException: Object reference not set to an instance of an object
the statement:
var gos : Renderer[ ];
gos = GetComponentsInChildren(Renderer) as Renderer[ ];
var go : Renderer;
for( go in gos ) { ← this statement get error message!!!
go.enabled=false;
}
it seems the original use of “for” can not use in iphone platform,WHY???
the statement:
Debug.Log (“gos.length=”+gos.length);
also get the same error message.
thank you