I have an enemy that is supposed to track the player. I can drag the player instance to the target variable on an instance of my enemy’s script but as soon as I make my enemy a prefab, the link is broken. I can then drag the player prefab (but not the instance) to the enemy script, but the enemies then target the prefab at 0,0,0. Is there a way to assign the player instance to the script variable on the prefab?
I’d like to avoid finding the player instance using code since I want to apply this method in other similar situations such as referencing the player instance from a UnityEvent on a prefab pickup script that should be more generic than just grabbing the player instance.