UTextureRenderTarget2D::UpdateTexture2D

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

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/TextureRenderTarget2D.h

Include

#include "Engine/TextureRenderTarget2D.h"

Source

/Engine/Source/Runtime/Engine/Private/TextureRenderTarget2D.cpp

Syntax

void UpdateTexture2D
(
    UTexture2D * InTexture2D,
    ETextureSourceFormat InTextureFormat,
    uint32 Flags,
    TArray< uint8 > * AlphaOverride
)

Remarks

Utility for updating an existing UTexture2D from a TextureRenderTarget2D TextureRenderTarget2D must be square and a power of two size.

Parameters

Parameter

Description

InTexture2D

Texture which will contain the content of this render target after the call.

InTextureFormat

Format in which the texture should be stored.

Flags

Optional Various control flags for operation (see EConstructTextureFlags)

AlphaOverride

Optional If non-null, the values here will become the alpha values in the resulting texture