UKismetRenderingLibrary::ConvertRenderTargetToTexture2DArrayEditorOnly
#include "Kismet/KismetRenderingLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Copies the current contents of a render target array into an existing Texture2DArray asset, overwriting its pixel data. Only works in the editor.
Caveats & Gotchas
- • Requires an already-existing Texture2DArray asset with matching slice count to write into.
- • Editor-only: has no effect in a packaged/cooked build.
- • Mismatched dimensions or slice counts between source and destination are not validated for you and can produce corrupted results.
Signature
static void ConvertRenderTargetToTexture2DArrayEditorOnly(UObject* WorldContextObject, UTextureRenderTarget2DArray* RenderTarget, UTexture2DArray* Texture); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | UObject* | Object used to resolve the current world. | — |
| RenderTarget | UTextureRenderTarget2DArray* | The source render target array to copy from. | — |
| Texture | UTexture2DArray* | An existing Texture2DArray asset whose pixel data will be overwritten. | — |
Return Type
void Example
Refresh an existing texture array asset C++
#if WITH_EDITOR
UKismetRenderingLibrary::ConvertRenderTargetToTexture2DArrayEditorOnly(this, CaptureRTArray, ExistingTextureArrayAsset);
#endif Tags
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?