MCPUMGDocumentation

Set Up UMG Focus Navigation

SetWidgetNavigation configures native UWidgetNavigation data for one widget in a Widget Blueprint template. It does not send input, change runtime focus or save assets. A successful call only marks the in-memory asset dirty; call SaveWidgetBlueprint when ready to save.

Read rules for all six directions

{"BlueprintPath":"/Game/UI/WBP_Menu","WidgetName":"PlayButton"}

GetWidgetNavigation always returns Up, Down, Left, Right, Next and Previous. If no navigation object is configured, all six report Escape.

Preflight and update selected directions

For example, to move focus down from the start button to the options button, read the start button’s current rules, then preflight that direction with dryRun. After applying the change, read the rule back and test moving focus down from the start button in PIE.

Rules updates only the supplied directions and leaves the rest unchanged. Supported rules are Escape, Stop, Wrap, Explicit and Custom. An Explicit target must be a different widget in the same WidgetTree. Custom requires a CustomFunction already present in the Widget Blueprint generated class with the signature UWidget* Function(EUINavigation).

{
"BlueprintPath":"/Game/UI/WBP_Menu",
"WidgetName":"PlayButton",
"Rules":{
"Down":{"Rule":"Explicit","TargetWidget":"OptionsButton"},
"Next":{"Rule":"Wrap"}
},
"dryRun":true
}

Omit dryRun or set it to false to apply the rules. The tool checks every direction in the request before writing them in one transaction. To restore a direction’s default escape rule, submit just that direction:

{"BlueprintPath":"/Game/UI/WBP_Menu","WidgetName":"PlayButton","Rules":{"Down":{"Rule":"Escape"}}}

Invalid directions, missing/cross-tree/self-referencing explicit targets and missing custom functions fail before any object is modified.