draw_material_to_render_target_region
Render a material as a rectangle onto a UTextureRenderTarget2D at a chosen position and size, compositing over existing pixels to produce region-specific effects.
Instructions
Draw a material as a rectangle onto a UTextureRenderTarget2D asset in one canvas pass in the editor world: position and size in render-target pixels from the top-left (size defaults to the whole target), full 0-1 UVs. It composites over the existing pixels by the material's blend mode: nothing is cleared, saved or undoable, and render-target contents live on the GPU only, so keep them with create_static_texture_from_render_target or export_render_target. A missing render target or material is an error; drawn is false, and the call fails, when a width or height that is not positive draws nothing. For a full-target pass use draw_material_to_render_target; for a texture, draw_texture_to_render_target.
Returns: { render_target_path: string, material_path: string, drawn: bool, position: [number], size: [number] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Optional [w, h] destination size, defaults to render target dimensions | |
| position | No | Optional [x, y] destination position, default [0,0] | |
| material_path | Yes | Asset path of the UMaterialInterface to draw | |
| render_target_path | Yes | Asset path of the destination render target |