create_render_target_2d
Create a UTextureRenderTarget2D asset in Unreal Engine with a specified path, width, height, and pixel format, and save it for rendering; existing assets are returned as-is.
Instructions
Create a UTextureRenderTarget2D asset at package_path/name with the given size and format, black clear color, and save it. An existing one there is returned as is: width, height and format are then ignored (already_exists:true). Returns asset_path, width, height, format and pixel_format.
Returns: { render_target_name: string, asset_path: string, created: bool, already_exists: bool, saved: bool, width: int, height: int, format: string, pixel_format: string, format_warning: string, save_error: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the render target asset to create | |
| width | No | Render target width in pixels, default 256 | |
| format | No | Render target format, default RTF_RGBA8: RTF_R8, RTF_RG8, RTF_RGBA8, RTF_RGBA8_SRGB, RTF_R16f, RTF_RG16f, RTF_RGBA16f (HDR), RTF_R32f, RTF_RG32f, RTF_RGBA32f or RTF_RGB10A2, RTF_ prefix optional; an unknown value falls back to RTF_RGBA8 with format_warning | |
| height | No | Render target height in pixels, default 256 | |
| package_path | No | Target content path, defaults to /Game/RenderTargets |