X157 Dev Notes

One simulant attempts to share insight with others.

How Common UI is Setup in LyraStarterGame

This document describes how the CommonUI plugin is set up and used by LyraStarterGame.

For general information about CommonUI, see my Common UI Overview.

Overall UI Layout

UI Layers (Activatable Widget Stacks)

UI.Layer.Game

Example: W_ShooterHUDLayout

UI.Layer.GameMenu

UI.Layer.Menu

UI.Layer.Modal

Lyra HUD Layout

LyraHUDLayout : public LyraActivatableWidget from CommonUI

/**
 * ULyraHUDLayout
 *
 *	Widget used to lay out the player's HUD (typically specified by an Add Widgets action in the experience)
 */
UCLASS(Abstract, BlueprintType, Blueprintable, Meta = (DisplayName = "Lyra HUD Layout", Category = "Lyra|HUD"))
class ULyraHUDLayout : public ULyraActivatableWidget

Widgets deriving from LyraHUDLayout will get native support to listen for UI.Action.Escape input tags and on each event push the BP-defined EscapeMenuClass to UI.Layer.Menu

The UI.Action.Escape event is defined in Project Settings

Debugging

When you’re wondering which widgets are currently active, you can use this console command to get an output log dump from Common UI:

Console Debug command: CommonUI.DumpActivatableTree