using StarterAssets; using UnityEngine; using UnityEngine.AI; public class Drone : MonoBehaviour { FirstPersonController player; NavMeshAgent agent; // Start is called once before the first execution of Update after the MonoBehaviour is created void Awake() { agent = GetComponent(); } void Start() { player = FindFirstObjectByType(); } // Update is called once per frame void Update() { agent.SetDestination(player.transform.position); transform.LookAt(player.transform); } }