reorder_widget_child
Reorder a widget within its parent panel by changing its child index; the new index is clamped to valid bounds, and CanvasPanel stacking may require ZOrder instead.
Instructions
Change a widget's index among its parent panel's children via UPanelWidget::ShiftChild (clamps new_index internally; safe with any int). For a CanvasPanel parent, visual stacking is governed by each child's CanvasPanelSlot ZOrder (set_widget_slot_properties z_order), NOT child index -- the index shift is still applied and reported honestly, with a note.
Returns: { widget_bp_path: string, widget_name: string, parent_name: string, old_index: int, requested_index: int, resolved_index: int, child_count: int, reordered: bool, parent_is_canvas_panel: bool, note?: string, saved: bool, save_error: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| new_index | Yes | desired index among its parent's children (clamped to [0, child_count]) | |
| widget_name | Yes | name of the widget to reorder | |
| blueprint_name | No | Alias of `widget_bp_path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `widget_bp_path`. | |
| widget_bp_path | No | /Game path of the Widget Blueprint asset |