CrimsonLoadingScreen · Lesson 6 of 7
Hold the Screen from Game Code
Before you start
- Completed: Register & Test
Chapters
Why hold
The map can finish loading before your game is ready — inventory hydrating, save data applying, procedural generation running. A hold is a vote: the screen stays up until every vote clears.
Blueprint: the process task
Call Create Loading Screen Process Task (CreateLoadingScreenProcessTask(WorldContext, Reason)) when your work starts — creating it holds the screen — and call Unregister on it when the work completes. The Reason string shows up in the debug output, so make it descriptive.
C++: the interface
Implement ICrimsonLoadingProcessInterface and answer the poll — the manager automatically asks the GameState, local PlayerControllers, and all their components every frame:
bool UInventoryHydrator::ShouldShowLoadingScreen(FString& OutReason){if (!bHydrated){OutReason = TEXT("Hydrating inventory");return true;}return false;}
Objects outside that auto-polled set register explicitly with RegisterLoadingProcessor / UnregisterLoadingProcessor.
ICrimsonLoadingProcessInterface is a plain C++ virtual (not a BlueprintNativeEvent) — Blueprint holds are always expressed through the process task.