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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback