Skip to content

Format

typescript
RenderTexture.ReleaseTemporary(rt)

class: RenderTexture

Description

Release the temporary texture allocated using GetTemporary.

Parameters

param_nametypedescription
rtRenderTextureThe temporary texture.

Return

typedescription
void

Code Example

typescript
function Test() {
    try {
        let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
        RenderTexture.ReleaseTemporary(temp_texture);
    } catch (error) {
        Debug.Log(error);
    }
}