Invisible Prefab spawning at location of Player before being instantiated

I am working on a script for a simple 2D object(Bear) to chase the Player Character. The Player contains a script with a prefab it can spawn called CampFire. The Bear cannot continue chasing the Player when in a certain distance from the campfire, and shows a constant debug of that distance.

The issue is that the debug is showing a distance to a campfire before it is spawn, at the location that the Player Character spawned. The location does not change when the player moves, it is constantly at the location the player spawn. There is no CampFire prefab in the hierarchy anywhere, it is only spawned.

HEllo.

We are not magicians, without posting the code, is impossible to know what is happening,.

Another thing, Unity does not fail. If is printing the distance is because the code is doing that. Learn to DEBUG your code, to see when and why is doing that.

Bye.