Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine > UCanvasRenderTarget2D
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 |
UFUNCTION (BlueprintCallable, Category="Canvas Render Target 2D",
Meta=(WorldContext="WorldContextObject"))
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 the instanced render target.
Parameters
Name | 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. |