# UpdateDirtyRegion(int, int, int, int, bool)

> Triggers an update to integrate modifications done to the heightmap outside of unity.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

> **Warning:**
>
> **Deprecated.** Please use DirtyHeightmapRegion instead.

```csharp
public void UpdateDirtyRegion(int x, int y, int width, int height, bool syncHeightmapTextureImmediately)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Start X position of the dirty heightmap region.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Start Y position of the dirty heightmap region.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width of the dirty heightmap region.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width of the dirty heightmap region.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Update immediately, instead of deferring the update.

### Remarks

This function is obsolete. Use either [TerrainData.CopyActiveRenderTextureToHeightmap](/engine/6000.7/script-reference/unityengine/terraindata/copyactiverendertexturetoheightmap.md) or [TerrainData.DirtyHeightmapRegion](/engine/6000.7/script-reference/unityengine/terraindata/dirtyheightmapregion.md) instead.

Invoke this function whenever custom Terrain heightmap paint tools modify the heightmap, to let Unity integrate the changes such as physics and collision updates.
