Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class NavMeshPlayer : MonoBehaviour
{
public Transform goal;
void Start ()
{
NavMeshAgent agent = GetComponent<NavMeshAgent>();
agent.destination = goal.position;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment