Skip to content

Api > NavMeshAgent > SetPath()


NavMeshAgent.SetPath(NavMeshPath path)⚓︎

Assign a new path to this agent.

Parameters:⚓︎

Name Type Description
path NavMeshPath New path to follow.

Returns:⚓︎

type Description
boolean True if the path is succesfully assigned.

Usage⚓︎

---@type NavMeshAgent
local navmeshagent;

---@type NavMeshPath
local path;


local val0 = navmeshagent.SetPath(path)

Extra Detail⚓︎

If the path is succesfully assigned the agent will resume movement toward the new target. If the path cannot be assigned the path will be cleared