Trying to raycast with a grid and return gameobjects hit, this is the jist of it, getting null reference, object not set to an instance of an object:
GOScript.CastRays (System.Object graphxcords, System.Object graphycords) (at Assets/GOScript.js:112)
which basically points to last line in code
arrayOfHitGos : GameObject[];
function Start(){
//do some stuff & start SomeCoroutine();
}
SomeCoroutine(){
for(var y in ycords){
for(var x in xcords){
returnToEqualThisVar=CastRays(x,y);
}
}
}
function CastRays(graphxcords, graphycords){
var hit : RaycastHit[];
var ray : Ray = camera.ViewportPointToRay (Vector3 (graphxcords,graphycords,0));
if (Physics.RaycastAll (ray, 1<<4)){
arrayOfHitGos = new GameObject [hit.Length];
}
}