UCanvasRenderTarget2D::CreateCanvasRenderTarget2D

Creates a new canvas render target and initializes it to the specified dimensions

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/CanvasRenderTarget2D.h

Include

#include "Engine/CanvasRenderTarget2D.h"

Source

/Engine/Source/Runtime/Engine/Private/CanvasRenderTarget2D.cpp

Syntax

static UCanvasRenderTarget2D * CreateCanvasRenderTarget2D
(
    UObject * WorldContextObject,
    TSubclassOf< UCanvasRenderTarget2D > CanvasRenderTarget2DClass,
    int32 Width,
    int32 Height
)

Remarks

Creates a new canvas render target and initializes it to the specified dimensions

Returns

Returns the instanced render target.

Parameters

Parameter

Description

WorldContextObject

The world where this render target will be rendered for

CanvasRenderTarget2DClass

Class of the render target. Unless you want to use a special sub-class, you can simply pass UCanvasRenderTarget2D::StaticClass() here.

Width

Width of the render target.

Height

Height of the render target.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss