Hi
I’m currently trying to make an Enemy AI that follows the Player. The Player can take one enemy and save it, then instantiate later.
The problem is when I instantiate a clone of the Enemy AI prefab it will, the transform reference of the player it uses to follow the player is empty.
I tried this in Void Start
[SerializeField]
private Transform _target;
void Start()
{
//Automatic Find the target
_target = GameObject.Find("Player").GetComponent<Transform>();
}
No luck. So my question is how can I Reference my Player’s transform in the Enemy AI inspector when they have been instantiated?