UTextureRenderTarget2D::ConstructTexture2D

Utility for creating a new [UTexture2D](API\Runtime\Engine\Engine\UTexture2D) from a TextureRenderTarget2D TextureRenderTarget2D must be square and a power of two size.

Windows
MacOS
Linux

Syntax

UTexture2D * ConstructTexture2D
(
    UObject * InOuter,
    const FString & NewTexName,
    EObjectFlags InObjectFlags,
    uint32 Flags,
    TArray< uint8 > * AlphaOverride
)

Remarks

Utility for creating a new UTexture2D from a TextureRenderTarget2D TextureRenderTarget2D must be square and a power of two size.

Returns

New UTexture2D object.

Parameters

Parameter

Description

Outer

Outer to use when constructing the new Texture2D.

NewTexName

Name of new UTexture2D object.

ObjectFlags

Flags to apply to the new Texture2D object

Flags

Various control flags for operation (see EConstructTextureFlags)

AlphaOverride

If specified, the values here will become the alpha values in the resulting texture

References

Module

Engine

Header

Runtime/Engine/Classes/Engine/TextureRenderTarget2D.h

Source

Runtime/Engine/Private/TextureRenderTarget2D.cpp

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