21 lines
405 B
C#
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()
|
|
{
|
|
|
|
}
|
|
}
|