Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UTextureRenderTarget
Description
Utility for creating a new UTexture from a UTextureRenderTarget. The method can fail if conversion is impossible
| Name | ConstructTexture |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/TextureRenderTarget.h |
| Include Path | #include "Engine/TextureRenderTarget.h" |
| Source | /Engine/Source/Runtime/Engine/Private/TextureRenderTarget.cpp |
UTexture * ConstructTexture
(
UObject * InOuter,
const FString & InNewTextureName,
EObjectFlags InObjectFlags,
EConstructTextureFlags InFlags,
const TArray < uint8 > * InAlphaOverride,
FText * OutErrorMessage
)
New UTexture object.
Parameters
| Name | Remarks |
|---|---|
| InOuter | Outer to use when constructing the new UTexture. |
| InNewTextureName | Name of new UTexture object. |
| InObjectFlags | Flags to apply to the new UTexture object |
| InFlags | Various control flags for operation (see EConstructTextureFlags) |
| InAlphaOverride | (Optional) the values here will become the alpha values in the resulting texture (8 bits alpha, regardless of the texture's format) |
| OutErrorMessage | (Optional) Error message in case of failure |