umg-and-slate

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

1|Updated Sep 6, 2026
One-click install
npx skills add https://github.com/ziyarduc/Baran-bk-game --skill umg-and-slate-ziyarduc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: umg-and-slate
Source: https://github.com/ziyarduc/Baran-bk-game/tree/main/.agents/skills/umg-and-slate
Command: npx skills add https://github.com/ziyarduc/Baran-bk-game --skill umg-and-slate-ziyarduc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building game UI in Unreal Engine requires navigating the UMG widget lifecycle, BindWidget wiring, Slate internals, and performance pitfalls that cause slow menus and broken bindings. This Skill provides verified, engine-source-grounded guidance for creating HUDs, menus, and in-world widgets correctly the first time. ## Core Features & Use Cases - UMG Widget Development: Covers the UUserWidget lifecycle (NativeOnInitialized, NativeConstruct, NativeDestruct), the meta=(BindWidget/BindWidgetOptional) pattern, CreateWidget/AddToViewport, and event binding with OnClicked delegates. - UI Architecture & Performance: Guides CommonUI activatable layer stacks (the Lyra pattern), MVVM viewmodels with FieldNotify, invalidation boxes, widget pooling with FUserWidgetPool and ListView, and Canvas Panel layout rules. - Slate & 3D Widgets: Explains SCompoundWidget authoring with declarative syntax, UWidgetComponent for in-world UI, and input mode management on PlayerController. - Use Case: When building a battle royale HUD showing health, shield, ammo, and storm timer, use this Skill to wire C++ push-based updates to Blueprint-designed widgets without per-frame property binding costs. ## Quick Start Use the umg-and-slate skill to create a UUserWidget C++ class with BindWidget properties for a health bar and ammo counter HUD.

Frequently Asked Questions about 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 the meta=(BindWidget) specifier on a UPROPERTY in your UUserWidget subclass, matching the variable name exactly to the widget name in the Widget Blueprint. Use BindWidgetOptional if the widget may be absent, and BindWidgetAnim with Transient for animations.

What is the difference between NativeConstruct and NativeOnInitialized?▼

NativeOnInitialized runs once per widget instance after CreateWidget, before the widget is shown. NativeConstruct runs every time the widget is added to the viewport, making it the right place to bind delegates and read current game state.

Should I use UMG, Slate, or CommonUI for game menus?▼

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

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

Slow UMG usually comes from per-frame property bindings, nested Canvas Panels, or widget create/destroy churn. Switch to event-driven push updates, use one root Canvas only, wrap static subtrees in Invalidation Boxes, and pool dynamic entries with UListView or FUserWidgetPool.

Why does my BindWidget cause a compile error in Unreal?▼

The C++ variable name must exactly match the widget's Name field in the Widget Blueprint designer, case-sensitively, and the types must match. If the widget might not exist in the Blueprint, use BindWidgetOptional and null-check before use.

How do I show a widget on screen from C++ in Unreal Engine?▼

Call CreateWidget<T> with a PlayerController, World, or GameInstance as owner, then call AddToViewport on the returned widget. Hold the pointer in a UPROPERTY so garbage collection does not destroy it, and use RemoveFromParent to hide it.