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

TerrainPaintUtility.EndPaintHoles

切换到手册
public static void EndPaintHoles (Experimental.TerrainAPI.PaintContext ctx, string editorUndoName);

参数

ctx要完成的地形孔洞 PaintContext。
editorUndoName用于撤销堆栈的唯一名称。

描述

Helper 函数,用于完成地形孔洞修改。

在修改后的数据写入到 PaintContext.destinationRenderTexture 之后,调用该函数可以将修改内容复制回原始地形区块。 该函数还指示 Unity 更新每个受影响的地形孔洞中的地形孔洞数据脏区,以便更新碰撞和物理效果。 该函数还将释放 PaintContext 中所有分配的资源。

请参阅 TerrainPaintUtility.BeginPaintHolesPaintContextPaintContext.ScatterHoles