Untitled
unknown
plain_text
9 months ago
298 B
8
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