# Sandbox.Navigation.NavMesh.GenerateTile

```csharp
System.Threading.Tasks.Task GenerateTile(PhysicsWorld world, Vector3 worldPosition)
```

Generates or regenerates the navmesh tile at the given world position.
This function is thread safe but can only be called from the main thread.

## Remarks

While most of the generation happens in parallel, this function also requires some time on the main thread.
If you need to update many tiles, consider spreading the updates accross multiple frames.

### Parameters

- `world` (`PhysicsWorld`)
- `worldPosition` (`Vector3`)

### Returns

`System.Threading.Tasks.Task`

Declared in [Sandbox.Navigation.NavMesh](/api/Sandbox.Navigation.NavMesh).
Assembly: `Sandbox.Engine`.
