ENEMY MOVEMENT SCRIPT - Unity Answers
answers.unity.com › enemy-movement-script-1ENEMY MOVEMENT SCRIPT - Unity Answers void Start () { NavAgent = GetComponent <NavMeshAgent> (); Sub = GameObject.FindGameObjectWithTag ("Player").transform; // this sets it to find the player sub but not attack we could change the sub to chase a AI or game object if we want to //NavAgent = GetComponent <NavMeshAgent> (); }