TerrainData.DirtyTextureRegion

Cambiar al Manual
public void DirtyTextureRegion (string textureName, RectInt region, bool allowDelayedCPUSync);

Parámetros

textureNameThe name of the Terrain texture.
regionThe rectangular region to mark as dirty.
allowDelayedCPUSyncSpecifies whether to allow delayed CPU synchronization of the texture.

Descripción

Marks the specified part of the Terrain texture as dirty.

Use this function only after you manually change the GPU part of the Terrain texture, such as by using Graphics.CopyTexture. Set the allowDelayedCPUSync parameter to true if you want Unity to perform immediate synchronization of the CPU part. If you set it to false, Unity queues the reading back of the dirty region until the next call to SyncTexture.

If the current active RenderTexture contains your changes, and you want to copy a part of it into the Terrain texture, use CopyActiveRenderTextureToTexture instead.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961