Prefab referencing prefab

Hi folks,

Looking for a little help with a confusing issue I am having.

I have a enemy gameobject created and saved as a prefab. My player controlled gameobject is also a prefab.
The enemy gameobject has a reference to the player controlled prefab. All seems ok.

But when I add the enemy object and player object into the game the enemy seems to have a reference to a different version of the player object. There is only one player object created in the game. No error is thrown and I can access the methods of the player objects script. It just is not the player object in the game.

If I change the enemy objects reference to a player object from the scene itself rather than the prefab everything works as expected.

I could work around this issue but its a bit of a pain

Can anyone shed some light on what is going wrong? Am i misunderstand how prefab references work ?

So you did a reference from enemy to a NEW player “prefab”'. But not to the one you added to your scene yourself, as that has a other indentyfier.
Why not edit the enemy script, to find the tag player in the scene to fill in your variable and use that as your referance to the players.