I'm having some problems on instantiating an enemy in unity, it gives me always this error setDestination" can only be called on an active agent that has been placed on a NavMesh., and then it places a 2d model somewhere in my map
public GameObject enemy;
public Transform spawn;
// Start is called before the first frame update
void Start()
{
spawnNew();
}
void spawnNew() {
Instantiate(enemy, spawn.transform.position, Quaternion.identity);
}