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

21 lines
405 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NavTest : MonoBehaviour
{
public Transform targetpos;
private UnityEngine.AI.NavMeshAgent nav;
void Start()
{
nav = GetComponent<UnityEngine.AI.NavMeshAgent>();
nav.SetDestination(targetpos.position);
}
// Update is called once per frame
void Update()
{
}
}