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

TerrainPaintUtility.EndPaintTexture

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

参数

ctx要完成的纹理绘制上下文。
editorUndoName用于撤销堆栈的唯一名称。

描述

Helper 函数,用于完成纹理 Alpha 贴图修改。

在修改后的数据写入到 PaintContext.destinationRenderTexture 之后,调用该函数可以将修改内容复制回原始地形区块。 该函数还通知 Unity 重新计算基础贴图。 该函数还将释放 PaintContext 中所有分配的资源。

另请参阅 TerrainPaintUtility.BeginPaintTexturePaintContextPaintContext.ScatterAlphamap

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