Problems with prefabbing my enemy

Hi, I’m making a 2D platform we using c# and I have created an enemy that has two scripts. One for general movement and another which is a script for a collider that sees wether the player is in the enemy’s line of sight (in order for the player to attack).
Everything worked great until I turned my enemy into a prefab and placed two in my game. As a result, entering the collider of one will trigger the collider of the other., even though I have used if statements for tags when colliding.
Is there a certain way I should prefab an enemy in order to get them to act as individuals.

Thanks.

It’s not an issue with prefabing it’s with your code, if you have any drag and drop references from the scene they won’t work. Tags are usually used for a group of objects as well, so that might be what is causing your issue… I can’t really say anything for sure without seeing your code.

@logicanschaos I figured out how to access a game object (the player and it’s position) through my code, avoiding having to drag and drop reference it. However I still have the the problem of that when I enter the collider of one enemy prefab, it’s activated the collider of the other enemy prefab.