I’m curious if there’s a reason why you separated SpawnAttacker() into two different methods? It’s more code with not a lot of gain from what I can see. When I did the challenge, I simply created the array as you did, but chose an enemy from the array during the instantiation:
private void SpawnAttacker()
{
Attacker newAttacker =
Instantiate(attackers[UnityEngine.Random.Range( 0, attackers.Length)],
transform.position, Quaternion.identity)
as Attacker;
newAttacker.transform.parent = transform;
}
I could see doing it if you’re trying not to put too much on one line, but that seems to be a personal preference.