Skip to main content

NavMeshAgent.SetPath(NavMeshPath path)

Assign a new path to this agent.

Parameters:

NameTypeDescription
pathNavMeshPathNew path to follow.

Returns:

typeDescription
booleanTrue 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