Skip to content

Format

typescript
RenderTexture.antiAliasing

class: RenderTexture

Description

(Read Only) The anti-aliasing level of the render texture.

This method returns an enum type, for more details see AntiAliasingLevel.

Parameters

param_nametypedescription

Return

typedescription
AntiAliasingLevelThe AntiAliasingLevel enum value.

Code Example

typescript
function Test() {
    try {
        let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
        // Get the anti-aliasing level of the render texture
        let antiAliasing = temp_texture.getAntiAliasing();
    } catch (error) {
        Debug.Log(error);
    }
}