Version: 2020.1
Experimental: this API is experimental and might be changed or removed in the future.

PaintContext.ScatterHeightmap

切换到手册
public void ScatterHeightmap (string editorUndoName);

参数

editorUndoName 用于撤销堆栈的唯一名称。

描述

通过将修改复制回源地形瓦片,应用已编辑的高度贴图 PaintContext。

完成对 PaintContext 的编辑后,destinationRenderTexture 中的已修改数据必须应用于每个地形中存储的纹理。 ScatterHeightmap 将执行此复制,然后标记法线贴图更新下一帧的已修改区域。 此函数还将创建一个延迟操作来重新构建碰撞、物理、像素误差指标、可见性包围盒以及草、树和细节位置。

TerrainPaintUtility.EndPaintHeightmap 在内部调用此函数。

另请参阅:PaintContext.GatherHeightmapPaintContext.ApplyDelayedActions