Version: 2020.2
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

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