Cute_demon_attacks/meng_yao/Assets/script/Ai.cs
2024-12-09 11:56:41 +08:00

18 lines
319 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class Ai : MonoBehaviour
{
public NavMeshAgent agent;
public Transform target;
// Update is called once per frame
void Update()
{
agent.SetDestination(target.position);
}
}