using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LessonMesh : MonoBehaviour
{
public GameObject obj;
// UnityEngine.AI.NavMeshAgent main;
private UnityEngine.AI.NavMeshAgent main;
void Start()
{
main = GetComponent<UnityEngine.AI.NavMeshAgent>();
}
void Update()
{
main.SetDestination(obj.transform.position);
}
}