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

PaintContext.Cleanup

切换到手册
public void Cleanup (bool restoreRenderTexture);

参数

restoreRenderTexture 为 true 时,指示此函数恢复 RenderTexture.active

描述

释放此 PaintContext 的已分配资源。

此函数释放 sourceRenderTexture 和 /destinationRenderTexture/。 restoreRenderTexture 为 true 时,它还将 RenderTexture.active 恢复为已另存为 _oldRenderTexture 的值。 TerrainPaintUtility.EndPaintHeightmapTerrainPaintUtility.EndPaintTextureTerrainPaintUtility.ReleaseContextResources 在内部调用此函数。

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