How-To: Live Preview, Confirmation & Restart

Goal: give the Apply/Cancel flow AAA behavior - preview changes before committing, keep/revert dialogs for risky settings, and a restart banner.

Prerequisites
A UCrimsonSettingScreen subclass (Quick Start step 4). All three are optional.

Live preview

With live preview on, slider/option changes update the UI immediately but do not commit until Apply; Cancel discards them. It works automatically for the _BP value classes (which the data asset creates).

Open the screen Blueprint, click Class Defaults, and under the Settings category tick Live Preview. That is the whole setup - the _BP value classes the data asset creates honor it automatically.

To turn it on and off while the screen is up instead, call Set Live Preview on the screen with its bool pin ticked or cleared - handy when only one tab of your menu should preview.

Confirmation countdown

Mark a risky setting (resolution, display mode) with Requires Confirmation (and optional Confirmation Timeout Seconds, default 15) in the data asset. On Apply the change goes live, then the screen fires K2_OnConfirmationRequired(TimeoutSeconds); call ConfirmSettingChange() on Keep or RevertSettingChange() on Revert / timeout.

HookWhen
K2_OnConfirmationRequired(Timeout)Fired after Apply when a confirmation-required setting was applied - show the keep/revert countdown UI.
ConfirmSettingChange()Player pressed Keep - locks in the value.
RevertSettingChange()Player pressed Revert, or your timer expired - restores the previous value.

Restart required

Mark a setting Requires Restart in the data asset. When such a setting is applied, the screen fires K2_OnRestartRequired() - override it to show a restart banner.

Verify
Preview: changes revert on Cancel. Confirmation: a countdown appears after Apply and auto-reverts if you wait. Restart: the banner shows after applying a restart-flagged setting.
Apply / Cancel is built in
The screen's Apply/Cancel run through UCrimsonSettingRegistryChangeTracker: ApplyChanges() commits every dirty setting; the screen's CancelChanges() reverts them via the tracker's RestoreToInitial() on each dirty setting (discarding preview values).