Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity navmeshagent set destination

// To use this script, you need a set-up navmesh surface.
// Attach this script onto a navmesh agent.

using UnityEngine;
using UnityEngine.AI;

public class SetDestination : MonoBehaviour {
  public Transform target;
  
  NavMeshAgent agent = GetComponent<NavMeshAgent>();
  
  void Update(){
    agent.SetDestination(target.position);
  }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: convert date to days c# 
Csharp :: c# if break 
Csharp :: c# async and await example 
Csharp :: how to insert data into multiple tables using asp.net c# 
Csharp :: sends keys enter selenium c# 
Csharp :: c# sort array 
Csharp :: instantiate date time variable C# 
Csharp :: c# anonymous type as return value 
Csharp :: how to jump in unity using physics 
Csharp :: c# string verbatim 
Csharp :: create stripe subscription pay_immediately 
Csharp :: HttpClient .net Core add Certificate 
Csharp :: c# define array 
Csharp :: dbset 
Csharp :: c# code examples 
Csharp :: camelCase and snakeCase 
Csharp :: Proxy in Config 
Csharp :: how to auto format c# code in visual studio 
Csharp :: Storing Data within your TileEntity 
Csharp :: c# int to short 
Csharp :: mock async method c# reutrnd 
Csharp :: c# create default instance of type 
Csharp :: list findall c# 
Csharp :: get one parameter from list in an new list c# 
Csharp :: how to refresh the data table in C# window form datagridview 
Csharp :: entity framework dynamic search solution 1 
Csharp :: index sort 
Csharp :: how to declare variables in c# 
Csharp :: Unity android plugin callback 
Csharp :: checkbox on change c# xamarin forms 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =