# EndFindPath(out int)

> Obtains the number of nodes in the path that has been computed during a successful NavMeshQuery.UpdateFindPath operation.

## Definition

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

## EndFindPath(int)

> **Warning:**
>
> **Deprecated.** The experimental NavMeshQuery struct has been deprecated. Use NavWorld instead.

```csharp
public PathQueryStatus EndFindPath(out int pathSize)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): A reference to an int which will be set to the number of NavMesh nodes in the found path.

### Returns

| Type                                                                                              | Description                                                             |
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [PathQueryStatus](/engine/6000.5/script-reference/unityengine/experimental/ai/pathquerystatus.md) | `Success` when the number of nodes in the path was retrieved correctly. |

### Remarks

This method prepares the path data so that [NavMeshQuery.GetPathResult](/engine/6000.5/script-reference/unityengine/experimental/ai/navmeshquery/getpathresult.md) can be used afterward to retrieve the actual array of [PolygonId](/engine/6000.5/script-reference/unityengine/experimental/ai/polygonid.md) values that make up the path.

**Important:** This method should only be called once at the end of the pathfinding operation. Calling it multiple times may ruin the stored path.

Additional Resources: [PathQueryStatus](/engine/6000.5/script-reference/unityengine/experimental/ai/pathquerystatus.md)
