Untitled

 avatar
unknown
plain_text
7 days ago
298 B
5
Indexable
using UnityEngine;
using UnityEngine.AI;
using Unity;

public class EnemyAI : MonoBehaviour
{

    NavMeshAgent nm;
    public Transform target;


    void Start()
    {
        nm = GetComponent<NavMeshAgent>();
    }


    void Update()
    {
        nm.SetDestination(target.position);

    }
}
Editor is loading...
Leave a Comment