UKismetRenderingLibrary::RenderTargetCreateStaticTexture2DArrayEditorOnly
#include "Kismet/KismetRenderingLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Creates a new static Texture2DArray asset from the current contents of a render target array. Only works in the editor.
Caveats & Gotchas
- • Editor-only: has no effect in a packaged/cooked build.
- • Blueprint DisplayName is "Render Target 2D Array Create Static Texture 2D Array Editor Only" rather than the C++ name.
- • Requires all slices of the source render target array to already contain the desired data — this function only copies, it does not render anything.
Signature
static UTexture2DArray* RenderTargetCreateStaticTexture2DArrayEditorOnly(UTextureRenderTarget2DArray* RenderTarget, FString Name = "Texture", enum TextureCompressionSettings CompressionSettings = TC_Default, enum TextureMipGenSettings MipSettings = TMGS_FromTextureGroup); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| RenderTarget | UTextureRenderTarget2DArray* | The source render target array to bake into a static texture array asset. | — |
| Name | FString | Base name/path used when creating the new texture asset. | "Texture" |
| CompressionSettings | enum TextureCompressionSettings | Compression settings applied to the resulting texture. | TC_Default |
| MipSettings | enum TextureMipGenSettings | Mip generation settings applied to the resulting texture. | TMGS_FromTextureGroup |
Return Type
UTexture2DArray* Example
Bake a render target array into a texture array asset C++
#if WITH_EDITOR
UTexture2DArray* BakedArray = UKismetRenderingLibrary::RenderTargetCreateStaticTexture2DArrayEditorOnly(CaptureRTArray, TEXT("/Game/Textures/T_BakedArray"));
#endif See Also
Tags
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?