mcpField
U
ue5-ui-umg-slate

ue5-ui-umg-slate

github.com/unrealxuDesign & UI53346 installsUpdated 9w ago
Repository

About ue5-ui-umg-slate

A UE5.6–UE5.8 skill for designing and implementing UMG, Slate, or hybrid game UI. It covers widget lifecycle, data binding, input and focus ownership, viewport placement, and cleanup.

Key features

  1. 01Choose UMG, Slate, or hybrid
  2. 02Plan widget lifecycle and bindings
  3. 03Manage input modes and focus
  4. 04Keep popups within viewport bounds
  5. 05Clean up delegates and references

Use cases

  1. 01Design a game HUD or menu
  2. 02Embed custom Slate content in UMG
  3. 03Prevent focus loss when closing popups
  4. 04Avoid stale bindings after widget removal

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/unrealxu/unrealengine5-skills --skill ue5-ui-umg-slate

After installing, type/ue5-ui-umg-slatein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
project-adapter.md
tooltip-patterns.md
umg-slate-bridge.md

Details

From the project README

Quick Start

  • Identify whether feature belongs to UMG, Slate, or hybrid bridge.
  • Define data source component/subsystem and UI binding point.
  • Output widget tree intent and runtime binding sequence.

API Anchors (UE5.6-UE5.8)

  • UMG lifecycle and viewport anchors:
    • UUserWidget::NativeConstruct(), UUserWidget::NativeDestruct()
    • UUserWidget::AddToViewport(...)
    • UWidget::RemoveFromParent()
    • UWidget::SetVisibility(...)
    • UWidget::SetKeyboardFocus()
  • UMG input mode anchors:
    • UWidgetBlueprintLibrary::SetInputMode_UIOnlyEx(...)
    • UWidgetBlueprintLibrary::SetInputMode_GameAndUIEx(...)
    • UWidgetBlueprintLibrary::SetInputMode_GameOnly(...)
  • UMG/Slate bridge anchors:
    • UWidget::TakeWidget() for Slate bridge hand-off
    • SCompoundWidget, SLATE_BEGIN_ARGS(...)
    • FSlateApplication::SetKeyboardFocus(...), SetUserFocus(...)
  • Viewport geometry anchor:
    • UGameViewportClient::GetViewportSize(...)

UI Stage Contract

  • Every UI task must define:
    • UI layer ownership (UMG-only, Slate-only, or hybrid bridge)
    • data source and update trigger (pull, push, event, or mixed)
    • focus and input ownership transition
    • viewport-safe placement behavior for tooltip/popup
    • teardown/cleanup path for unbinds and widget removal
  • If any item is missing, the UI implementation is incomplete.

Workflow

1) UI Architecture Decision

  • Select UMG for standard game HUD/menu work.
  • Select Slate for custom rendering/input behavior that UMG cannot express cleanly.
  • Select hybrid when a UWidget host needs to embed custom Slate content.

2) Construct and Lifetime

  • Initialize widget bindings in construct/init path.
  • Register event listeners once and store handles when required.
  • Define destruct/unregister logic explicitly to avoid stale bindings.

3) Data Binding and Refresh

  • Bind runtime data from one authoritative source (subsystem/component/view model).
  • Use event-driven refresh for high-frequency data where possible.
  • Keep display widgets read-only for gameplay state mutation.

4) Input and Focus Ownership

  • Set input mode deliberately when opening/closing UI contexts.
  • Set keyboard/user focus to intended root widget.
  • Ensure focus return path back to gameplay on close.

5) Tooltip/Popup Viewport Clamp

  • Compute desired tooltip position from anchor and cursor/widget geometry.
  • Clamp final placement to viewport bounds to avoid off-screen rendering.
  • Debounce high-frequency hover updates to avoid flicker.

6) Remove and Cleanup

  • Remove widget from parent or viewport on close.
  • Clear timers/delegates and transient references.
  • Confirm no duplicate instances persist after reopen.

Constraints

  • Keep UI rendering and gameplay state mutation separated.
  • Avoid direct gameplay writes from passive display widgets.
  • Clamp tooltip and popup placement to viewport bounds.
  • Prefer deterministic input ownership and focus transitions.
  • Keep Slate-only code isolated behind clear bridge boundaries.
  • Do not rely on per-frame polling if event-driven updates are available.

Failure Handling

  • Symptom: widget appears but never refreshes.
    • Locate: construct timing, binding registration, source event firing.
    • Fix: bind after source readiness and verify event subscription path.
  • Symptom: widget refreshes once then stops.
    • Locate: lost delegate handle or widget recreated without rebind.
    • Fix: rebind on construct and unbind on destruct; prevent duplicate create/destroy churn.
  • Symptom: input is swallowed by UI unexpectedly.
    • Locate: current input mode and focused widget path.
    • Fix: enforce intended input mode and set explicit focus target.
  • Symptom: keyboard/controller navigation breaks after popup open.
    • Locate: focus transfer and return path.
    • Fix: store previous focus owner and restore on popup close.
  • Symptom: tooltip flickers near screen edges.
    • Locate: oscillating clamp output and hover source jitter.
    • Fix: debounce hover updates and clamp with stable viewport metrics.
  • Symptom: memory growth after repeated open/close.
    • Locate: stale delegate/timer/reference retention.
    • Fix: clear bindings and transient refs in teardown.

UE5.6-UE5.8 Compatibility Notes

  • UMG lifecycle, input mode, and Slate focus APIs listed above are stable in UE5.6-UE5.8.
  • Prefer Enhanced Input + explicit UI input mode ownership across all supported versions.

Escalation

  • Escalate when behavior requires engine-level Slate customization beyond project scope.
  • Escalate when UI architecture conflicts with existing CommonUI framework decisions.

Comments

Markdown supported