Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UpdateFindPath(int, out int)

Continues a path search that is in progress.
Read time 1 minuteLast updated 12 days ago

Definition

UpdateFindPath(int, int)

Warning
Deprecated. The experimental NavMeshQuery struct has been deprecated without replacement.
public PathQueryStatus UpdateFindPath(int iterations, out int iterationsPerformed)

Parameters

iterations

Maximum number of nodes to be traversed by the search algorithm during this call.

iterationsPerformed

Outputs the actual number of nodes that have been traversed during this call.

Returns

Type

Description

PathQueryStatus
InProgress
if the search needs to continue further by calling
UpdateFindPath
again.

Remarks

The operation needs to have been initialized previously with NavMeshQuery.BeginFindPath and it will run until the entire route is found or the specified number of iterations have been executed.
As long as the previous call returned a state of
InProgress
this method can be called repeatedly, across different frames, until the operation is successful. Use NavMeshQuery.EndFindPath afterwards to prepare the path data for retrieval, along with the number of contained nodes.
Additional Resources: PathQueryStatus.