It is hard to know what is going on in your scene from the information you have given here, since we cant know how many objects that are in your scene with the tag 'tagName'.
For all I know that is your problem.
Also, when you say that you define an array with the length of 6, do you mean in the inspector? Because that would immediatly be override with
Try debugging it further. Are you sure your tagName is exactly what you expect?
print("tagName: [" + tagName + "].");
Make sure it have same casing, no extra spaces and such (That's why I enclose the tagName in brackets). So it should read in the output.
tagName: [Enemy].
You also have some code that you haven't shown and it's the declaration of newround. Is it just a boolean var or a property? If it is a property, maybe it does something strange with your gos array.
well i know what you mean... the problem is, why does it count back to zero 7 times?
I suddenly realized that the Enemy's have the same script attached (one main scipt for both player and enemy) but the function is private, so it shouldn't be a problem. Still, if it is attached to the enemy, i guess there could be a confilct, but i can't think of any.
but start and update... it doesn't matter. It still doesn't work.
EDIT:
ow I misread.. but it still doesn't solve anything. If I print the array length even when destroying some enemy's while playing it just gives:
so everything should be correct... But if I remove everything out of the 'foreach' statement, the problem still occurs..
EDIT:
Even if I remove the whole foreach statement it still gives this output. There are some parts of the script I didn't post, but they have nothing to do with array's or these variables. It's just for sprite animation and such, nothing special.