Skip to content

格式

typescript
RenderTexture.ReleaseCPUMemory()

所属类: RenderTexture

描述

手动清理纹理相关cpu内存。

参数

参数名类型描述

返回值

类型描述
void

代码示例

typescript
function Test() {
    try {
        let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
        let pixel = temp_texture.GetPixel(10,20,1)
        texture.ReleaseCPUMemory();
    } catch (error) {
        Debug.Log(error);
    }
}