DirtyTextureRegion(string, RectInt, bool)
Marks the specified part of the Terrain texture as dirty.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.TerrainModule
public void DirtyTextureRegion(string textureName, RectInt region, bool allowDelayedCPUSync)
Parameters
Remarks
Use this function only after you manually change the GPU part of the Terrain texture, such as by using Graphics.CopyTexture. Set the parameter to if you want Unity to perform immediate synchronization of the CPU part. If you set it to , Unity queues the reading back of the dirty region until the next call to TerrainData.SyncTexture.
allowDelayedCPUSynctruefalseIf the current active RenderTexture contains your changes, and you want to copy a part of it into the Terrain texture, use TerrainData.CopyActiveRenderTextureToTexture instead.