# SetPath(NavMeshPath)

> Assign a new path to this agent.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.AI](/engine/6000.3/script-reference/unityengine/ai.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public bool SetPath(NavMeshPath path)
```

### Parameters

**** (\[NavMeshPath]\(/engine/6000.3/script-reference/unityengine/ai/navmeshpath)): New path to follow.

### Returns

| Type                                                          | Description                               |
| ------------------------------------------------------------- | ----------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the path is succesfully assigned. |

### Remarks

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 (see [NavMeshAgent.ResetPath](/engine/6000.3/script-reference/unityengine/ai/navmeshagent/resetpath.md)).
