I have created a game manager that fills a list of enemies. Anytime the player kills one of the enemies, it is removed from this list. When the list reaches 0, the list is refilled with more enemies. The enemies I am using is a prefab. This prefab has a child object that acts as a spawner for where the enemy will shoot from. The issue I am getting is that when the enemy is destroyed, the child projectile spawner remains and continues to fire while the enemy itself is destroyed. When I try to simply delete the child, it does not re-instantiate when a new enemy is created. How can I activate and deactivate this child? Would that even do anything since the spawner would still be in the same location of the last destroyed enemy? Should I change how I am finding where the enemy should fire from so I do not need a child? (Also I am programming in C#)
Thanks!,