ue-umg-and-slate

Build Unreal Engine game UI with UMG widgets, Slate, and CommonUI in C++.

55|5|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-umg-and-slate-kevinpbuckley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ue-umg-and-slate
Source: https://github.com/kevinpbuckley/unreal-engine-skills/tree/main/skills/core/ue-umg-and-slate
Command: npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-umg-and-slate-kevinpbuckley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building game UI in Unreal Engine requires knowing the correct UUserWidget lifecycle, the BindWidget pattern, widget creation and viewport management, and performance rules that are easy to get wrong — this Skill gives an AI agent the exact UE 5.8 APIs, patterns, and gotchas to write correct UMG/Slate/CommonUI code. ## Core Features & Use Cases - UMG widget authoring in C++: UUserWidget lifecycle (NativeOnInitialized, NativeConstruct, NativeDestruct, NativeTick), meta=(BindWidget/BindWidgetOptional/BindWidgetAnim), CreateWidget + AddToViewport/RemoveFromParent, and event binding via OnClicked AddDynamic. - UI architecture and data flow: CommonUI activatable layer stacks (the Lyra pattern), MVVM viewmodels with FieldNotify, push-based updates instead of property bindings, DPI scaling, and safe zones. - Performance optimization: invalidation boxes, retainer boxes, volatility, widget pooling with FUserWidgetPool and ListView, Canvas Panel nesting rules, animation cost tiers, and profiling with stat Slate and Widget Reflector. - Use Case: Ask the agent to create a HUD with a health bar and score counter wired to gameplay in C++ — it produces a UUserWidget subclass with BindWidget properties, delegate-driven updates, and correct lifecycle handling. ## Quick Start Use the ue-umg-and-slate skill to create a UUserWidget-based HUD in C++ with a BindWidget progress bar and a button that handles OnClicked events.

Frequently Asked Questions about ue-umg-and-slate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bind C++ variables to UMG widgets in Unreal Engine?

Use UPROPERTY(meta=(BindWidget)) on a TObjectPtr member whose name exactly matches the widget name in the Widget Blueprint. Use BindWidgetOptional if the widget may be absent, and BindWidgetAnim with Transient for UWidgetAnimation references.

What is the difference between NativeConstruct and NativeOnInitialized in UUserWidget?

NativeOnInitialized runs once per instance right after CreateWidget, before the widget is shown. NativeConstruct runs every time the widget is added to the viewport, like BeginPlay, so bind delegates and read game state there.

Should I use UMG, Slate, or CommonUI for Unreal game UI?

Use UMG for game HUDs and screens, CommonUI for menus with gamepad or multiplatform input routing, and raw Slate only for editor tools or bespoke widgets not expressible in UMG. CommonUI's activatable widget stacks handle focus and back navigation automatically.

Why is my UMG UI slow and how do I optimize it?

Slow UMG usually comes from per-frame property bindings, Tick logic, nested Canvas Panels, or create/destroy churn. Push updates from gameplay delegates, wrap static subtrees in Invalidation Boxes, pool dynamic entries with UListView or FUserWidgetPool, and profile with stat Slate and Widget Reflector.

Why does my UMG widget get destroyed or disappear at runtime?

The garbage collector destroys widgets not held in a UPROPERTY, even while displayed. Always store the CreateWidget result in a UPROPERTY() member, and use RemoveFromParent instead of the deprecated RemoveFromViewport.

How do I show a UMG widget on a 3D object in the world?

Add a UWidgetComponent to the actor, call SetWidgetClass with your UUserWidget class, set a non-zero DrawSize, and choose EWidgetSpace::World or Screen. Access the live instance with GetWidget() after BeginPlay, and pair with UWidgetInteractionComponent for player clicks.