Function AIPath.OnTargetReached

OnTargetReached ()

The end of the path has been reached.

Public
void OnTargetReached ()

The end of the path has been reached.

If you want custom logic for when the AI has reached it's destination add it here. You can also create a new script which inherits from this one and override the function in that script.

This method will be called again if a new path is calculated as the destination may have changed. So when the agent is close to the destination this method will typically be called every period seconds.

Deprecated

Avoid overriding this method. Instead poll the reachedDestination or reachedEndOfPath properties.