Skip to content

Format

typescript
RenderTexture.active

class: RenderTexture

Description

The currently active render texture.

Parameters

param_nametypedescription

Return

typedescription
RenderTextureThe render texture.

Code Example

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