Skip to content
Tuxedo CatSTUDIO
Menu

UI Director C++ API

Review draft. This source page has not completed website editorial and release-specific verification.

Each ULocalPlayer owns a UUIRuntimeSubsystem. Use RegisterPresentation, UpdatePresentation, UpdatePresentationView, and RemovePresentation to manage its semantic presentation. Use TryGetPresentation or GetPresentationSnapshot for copied read-only state. FUIDirectorPresentationView contains neutral text, status, soft icon, entries, and metrics. The subsystem assigns each presentation a monotonic int64 semantic revision for the lifetime of that LocalPlayer subsystem, and actions submit that revision as their stale-action guard. It advances for meaningful committed presentation changes, not for frames, Inspector refreshes, widget reconstruction, rejected updates or no-change updates. It is not periodically reset or reused; revision exhaustion rejects new revisions rather than wrapping.

Use RegisterSurfaceDefinition to map a presentation type to a game-owned UUserWidget, layer, priority, modal/focus behavior, and optional input/cursor request. Query definitions, active surface snapshots, surface availability, modal state, logical focus, and effective policy through the corresponding TryGet.../Get... functions. The runtime retains presentation state across world/controller transitions and reconstructs disposable widget projections when a valid surface context returns.

SubmitPresentationAction validates PresentationId, requested visibility, view enabled state, current revision, EntryId, ActionId, and entry enabled state. Its result uses EUIDirectorPresentationActionStatus and EUIDirectorPresentationActionReason. Accepted actions emit the established native and Blueprint delegates; UI Director does not execute gameplay.

Under WITH_EDITOR, UUIRuntimeSubsystem exposes TryGetLatestEditorActionDiagnostic, GetEditorActionDiagnosticCount, and OnEditorActionDiagnosticChanged. The diagnostic contains only the latest attempt per presentation and is capped at 128 entries. It reuses the runtime action status and reason enums. These declarations, storage, and recording code are absent when WITH_EDITOR is false. The Slate Runtime Inspector is implemented only in UIDirectorEditor; its model subscribes while its tab is open and removes its bindings on teardown.

UIDirectorRuntime has no Editor dependency. UIDirectorEditor depends on UI Director Runtime and Unreal Editor/Slate tooling only. Neither module requires DirectorBridge or another gameplay Director.