[Solved] - Position code not working

Problem:

Unity Build: 4.6.9f1

My first problem was when the wire sphere didn’t show up, even though I’m pretty sure my code is correct. I decided to ignore that problem, and just use the object icon option instead. But then, when I try to instantiate the enemy prefab into each position, it also fails. You can see what I mean in the picture:

Here is my position.cs script:
http://pastebin.com/jgcZBfN8

Here is my Enemy Spawner.cs script:
http://pastebin.com/wYweEzWP

Here are my project files:
My_LaserDefender.zip (1.7 MB)

SOLUTION

My “O” was not capitalized in “OnDrawGizmos”, and also the “position” gameobjects should have been dragged in to be children of the formation object. Thanks so much to @OboShape

looking at your function in the position.cs script , you need a capital O in OnDrawGizmos

the capitilisation of functions, especially MonoBEhaciours like Start, Update etc is important one to watch out for. if we miss out a capital S in say start(), the compiler wont complain, it just wont get called and can lead to much hair pulling seen as it doesnt generate any errors

Thanks @OboShape, you’re right I can see the wire sphere now that I added capital “O”, but when I try to play the game, I still can’t see the enemies.

the spawner script attached to the formation object is looking for children transform components.
however it cant find any, so it cannot instantiate anything.

the position gameobjects should be dragged in to be children of the formation object, should be good to go :wink:

Solution marked as was solved on discord.