Death Animation Playing On A Different Enemy I Shoot


I am instantiating enemies on 3 different spawn points. Let’s name them Enemy A, Enemy B and Enemy C for the sake of this question.

Sometimes, when I shoot Enemy A, the death animation plays on Enemy B or Enemy C. However, the damage is actually absorbed by Enemy A. This means that Enemy A stays in the idle animation and gets destroyed after 10 seconds. If I then go near Enemy B or Enemy C, they then follow me and try to attack me while being in the death animation.

I am making all of this work by instantiating them via a prefab.

I would appreciate any given help and please let me know if you require any additional information.


Wave Spawner Properties:

Enemy Properties (disregard the empty target as that is not the issue):


I had the animations set as static and they were being adopted by all prefabs.

To eliminate this problem simply change the static to public or private.