Skip to main content

NavAgent

Interfaces with a character's NavMeshAgent to allow a character to move throughout a NavMesh.

To get a NavAgent from an item, use the GetComponent method.

let navAgentComponent = item.GetComponent("NavAgent")

You can then use the navAgentComponent property to access the Dropdown class.

Methods

Method NameReturn TypeParametersDescription
Warpboolfloat3Warps agent to the provided position

Properties

Property NameTypeDescription
EnabledboolChecks the active state of the component
SpeedfloatMaximum speed allowed when following a path
Destinationfloat3Gets or attempts to set the destination of the agent in world-space units
IsPathPendingboolChecks if a path is in the process of being computed (Readonly)
PathNavPathGets or sets the current path