Quick answer: Open Widget Reflector to see what is actually in the widget tree. Common causes: Visibility set to Hidden or Collapsed, anchors placing the widget off-screen, zero-size root canvas, or Z-order behind another full-screen widget. Widget Reflector reveals all of these.

Here is how to fix Unreal UMG widget not visible after AddToViewport. You create a health bar widget, call CreateWidget and AddToViewport in your player controller’s BeginPlay. The game runs. No widget. No errors. You check the widget asset — it looks fine in the designer. You add a bright red border to make it obvious — still invisible. UMG has multiple layers of invisibility, and without the Widget Reflector you are debugging in the dark.

The Symptom

After calling AddToViewport on a UserWidget, the widget does not appear on screen. The call returns without error. IsInViewport() returns true. Other widgets (main menu, pause menu) may work fine. Only specific widgets fail.

Variant: the widget appears briefly then disappears. Or appears at the wrong size (tiny or huge). Or is clickable in an invisible state (input hits it but nothing draws).

What Causes This

Visibility set to Hidden or Collapsed. Every widget has a Visibility property. Hidden means “takes space but does not render.” Collapsed means “takes no space, does not render.” If the root widget or any ancestor in the hierarchy is Hidden/Collapsed, nothing shows.

Anchors place widget off-screen. UMG anchors determine how the widget positions within its parent. An anchor set to (0, 0) with large Position X/Y can place the widget far off the screen’s visible area. Size to content with anchors at a corner is a common misconfiguration.

Root CanvasPanel has zero size. If the root is a CanvasPanel with no content, UMG may give it zero size, and any non-anchor-stretching children inside render at zero size. Set the root’s desired size explicitly or use anchor fill.

Z-order covered by another widget. A fullscreen widget added first, then your HUD widget added without specifying Z-order, can result in the fullscreen widget covering the HUD. AddToViewport takes a Z-order parameter — higher numbers render on top.

Viewport resolution mismatch. If you render in a small PIE window and your widget uses absolute pixel positions sized for 1920x1080, the widget may render at coordinates outside the current viewport. Use anchors and scaling instead of absolute positions.

RemoveFromParent called. Somewhere, your code calls RemoveFromParent immediately after AddToViewport — perhaps in a reinitialize path or a state transition. The widget exists but is not in the viewport.

The Fix

Step 1: Open Widget Reflector. Window > Developer Tools > Widget Reflector. In the dialog, click “Pick Live Widget” and click anywhere in your game. The reflector shows the full widget hierarchy with sizes, positions, and Visibility. Find your widget in the tree. If:

Step 2: Verify Visibility. In the widget designer, select the root widget. In the Details panel, confirm Visibility = Visible (or SelfHitTestInvisible for overlay graphics). Check each parent up to the root. Any Hidden/Collapsed in the chain hides the whole subtree.

At runtime, you can force visibility:

void APlayerController::ShowHUD()
{
    if (HUDWidget == nullptr)
    {
        HUDWidget = CreateWidget<UUserWidget>(this, HUDWidgetClass);
        HUDWidget->AddToViewport(0);
    }
    HUDWidget->SetVisibility(ESlateVisibility::Visible);
}

Step 3: Check anchors and position. In the widget designer, select your root widget’s child (if root is CanvasPanel). In the Layout section, set Anchors to fill the parent (“Anchor All”). Set Position X/Y to 0, Size X/Y to your intended size. Or use anchor presets (the flower-shaped button) to snap to common layouts.

If your widget should fill the screen, set anchors to (0, 0) to (1, 1) with all offsets 0. This stretches the widget to viewport size.

Step 4: Set Z-order explicitly. When adding multiple widgets:

BackgroundWidget->AddToViewport(0);   // background layer
HUDWidget->AddToViewport(10);         // HUD above background
MenuWidget->AddToViewport(100);       // menu above HUD

Use numeric gaps (10, 100) so you can insert layers between later.

Widget Created But Not Added

A common bug: you call CreateWidget but forget AddToViewport, or you call them on different widget instances. Verify with a log:

UUserWidget* Widget = CreateWidget<UUserWidget>(this, HUDWidgetClass);
if (Widget)
{
    UE_LOG(LogTemp, Log, TEXT("Widget created: %p"), Widget);
    Widget->AddToViewport();
    UE_LOG(LogTemp, Log, TEXT("InViewport: %d"), Widget->IsInViewport());
}

If IsInViewport logs 1 but the widget is still invisible, the issue is layout/visibility. If it logs 0, AddToViewport silently failed — check player controller context.

Widget Owner Matters

CreateWidget takes an owning player as parameter. If the owner is not a local player (for example, a server-side PlayerController), the widget cannot be added to a viewport. Always pass the local player controller as the owner.

HDR and Post-Processing

Certain HDR tonemapper settings can make bright-on-dark widgets wash out or blend into the background. If your widget looks “almost invisible” rather than gone, check post-process exposure settings. Test with a high-contrast test widget (black border, white fill) to rule out brightness issues.

“Widget Reflector is the Inspector for UMG. Never debug UMG without it open.”

Related Issues

For Blueprint interface issues, see Blueprint Interface Not Calling C++ Implementation. For input-related UI issues, Enhanced Input Action Not Firing covers related input routing.

Widget Reflector, Pick Live Widget, find it in the tree. Every UMG bug starts there.