CrimsonLoadingScreen · Lesson 6 of 7

Hold the Screen from Game Code

Intermediate4 minRuntime

Before you start

  • Completed: Register & Test
Video coming soon

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.

Create the process task, promote it to a variable, Unregister when ready.
Promote it to a variable
The manager holds the task weakly. If you drop the reference, garbage collection collects it and the hold silently releases mid-load. Always store it in a variable until you Unregister.

C++: the interface

Implement ICrimsonLoadingProcessInterface and answer the poll — the manager automatically asks the GameState, local PlayerControllers, and all their components every frame:

cpp
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.

Why Blueprint uses the task
ICrimsonLoadingProcessInterface is a plain C++ virtual (not a BlueprintNativeEvent) — Blueprint holds are always expressed through the process task.