How-To: Get the Building Blocks
Goal: reach the five CrimsonUI pieces every other page assumes you can reach - the local player, the root layout / push API, the messaging subsystem, the context-menu subsystem, and the UI settings. Bookmark this page; the task pages link back here instead of repeating these chains.
1. The local player
Most CrimsonUI entry points key off ULocalPlayer, not the PlayerController. Inside a widget you already own one; elsewhere derive it from a PlayerController.
2. The root layout and the push API
Blueprint never needs the layout object itself - UCrimsonUIExtensions (a Blueprint function library in CrimsonCommon) pushes and pops by local player. C++ can grab the layout directly for the typed template push.
Sync push: Push Content To Layer For Player (Crimson UI Extensions) - inputs Local Player, Layer Name (UI.Layer.* picker), Widget Class; returns the created widget. Async push: the same-named async node - inputs Owning Player (PlayerController), soft Widget Class, Layer Name. Removal: Pop Content From Layer with the widget reference.
UCommonActivatableWidget subclass appears on the chosen layer; Pop Content From Layer removes it.3. The messaging subsystem (dialogs)
UCrimsonMessagingSubsystem is a ULocalPlayerSubsystem. Blueprint reaches dialogs through the async nodes (which find the subsystem internally); C++ gets the subsystem from the local player.
4. The context-menu subsystem
UCrimsonContextMenuSubsystem is also a ULocalPlayerSubsystem, and its API is fully Blueprint-exposed.
5. The UI settings
UCrimsonUISettings holds the policy and dialog classes. It is a UDeveloperSettings (Config=Game) - edit it in Project Settings -> Crimson -> Crimson UI. Reading it at runtime is C++-only (GetDefault), and you rarely need to: the manager and messaging subsystem read it for you.
#include "Infrastructure/CrimsonUISettings.h"const UCrimsonUISettings* Settings = GetDefault<UCrimsonUISettings>();TSoftClassPtr<UCrimsonGameUIPolicy> PolicyClass = Settings->DefaultUIPolicyClass;
UCrimsonUIManagerSubsystem (game-instance subsystem) is plumbing you normally never touch: no Blueprint API, and its GetRootLayout(const UCrimsonCommonLocalPlayer*) / inherited GetCurrentUIPolicy() accessors are C++-only. Everything user-facing goes through the push API (step 2) instead.See also
- How-To: Push & Pop Screens - the push API in anger, including suspend/resume input.
- How-To: Show Confirmation Dialogs - descriptors, results, custom dialog classes.
- Concept: Policy & Layout Architecture - what the manager/policy/layout actually do.