# onPreUpdate

> Set a function to be called before the NavMesh is updated during the frame update execution.

## Definition

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

```csharp
public static NavMesh.OnNavMeshPreUpdate onPreUpdate
```

### Remarks

This lets you set a delegate function to be called every frame, right before the NavMesh system gets updated.

Additional Resources: [NavMesh.OnNavMeshPreUpdate](/engine/6000.6/script-reference/unityengine/ai/navmesh/onnavmeshpreupdate.md)
