So, I was feeling pretty happy with myself but feel like I’ve lost the plot on this lecture. Hopefully writing this out with help me resolve my confuddle. This stems from the challenge @ 07:14 - setting the myLaneSpawner and looking at what is in the lane.
I think the root of my issue is I am not sure what the ask of the challenge is, but going on from that I think we need to:-
- Iterate through the Spawner prefabs shown in scene view (mine were called Lane1, Lane2 etc under the parent Spawners
- Check if and of the Lanes has spawned an attacker, lizzer or foxey
- Because of our nice neat instantiate within parents, each row or lane could have child objects and you see these spawn nested nicely in scene view
My confusion is, that we are iterating through the Lane1,2,3 gameObject instances, and looking for ‘Spawners’ - which are what? Classes? I cannot resolve why this isnt an iteration through the Lane1,2,3 instances exercise to see if we have children attackers spawned under them. Why do we create a local reference to the Spawner (script / class) and not grab the child game object?
See, told you I was confused!