c# – How can I make a prefab object that can get the location/transform of a regular object in my 2D Unity game?

I have a player object that is part of the scene in Unity, and I also have a level generator which I would like to use to add enemies to the level. However, I’m new to Unity and I’m not sure how to reference the location of the player so that the two can interact.