How-To: Show Save/Load Progress UI
Goal: show a loading screen while a slot loads, and a "saving - do not close the game" indicator while a save runs, both driven by the save manager's lifecycle delegates.
UCrimsonSaveGameManagerSubsystem and are BlueprintAssignable.1. The four lifecycle delegates
Each operation has a start/finish pair. Bind the start delegate to show UI and the matching finish delegate to hide it. Because saves and loads are asynchronous, never hide the UI on the line after the request call - wait for the finish delegate.
| Delegate | Signature | When fired |
|---|---|---|
OnLoadStarted | (none) | A load begins, before any fragment is read. |
OnLoadComplete | bool bSuccess | A load finishes. bSuccess is false if a fragment failed. |
OnSaveStarted | (none) | A save begins, before any fragment is written. |
OnSaveComplete | bool bSuccess | A save finishes. bSuccess is false if any fragment failed. |
2. Bind start and finish to show and hide the UI
For the loading screen, add it to your loading queue on OnLoadStarted and remove it on OnLoadComplete. For the "do not quit" banner, show it on OnSaveStarted and hide it on OnSaveComplete. The save pair covers every save path - manual, quick, auto, and the synchronous save-on-exit.
Images/CrimsonSaveSystem/howto-progress-ui.pngRequestLoadFromSlot on a populated slot: the loading screen appears immediately and disappears only once OnLoadComplete fires. Then trigger a save and confirm the banner shows on OnSaveStarted and clears on OnSaveComplete.3. Poll the state instead of binding
When you just need a yes/no right now - to gate a Quit button or a level-transition prompt - call IsSaveOrLoadInProgress() instead of holding your own flag. It is a BlueprintPure getter (Blueprint node Is Save Or Load In Progress) that returns true between any start and its matching complete.
UCrimsonSaveGameManagerSubsystem* SaveMgr =UCrimsonSaveGameManagerSubsystem::Get(this);const bool bBusy = SaveMgr && SaveMgr->IsSaveOrLoadInProgress();QuitButton->SetIsEnabled(!bBusy);
OnSaveStarted / OnSaveComplete fire only on the instance that runs the save - a listen-server host or a single-player client sees them; a pure client never does. To show a saving indicator on clients, replicate a flag or send a Client_ RPC from the server. Loads fire on whichever instance calls RequestLoadFromSlot.SaveGameToActiveSlotSynchronous() (the shutdown / PIE-end save) blocks the game thread, so OnSaveStarted and OnSaveComplete fire back-to-back on the same frame. A banner will not paint during it - expected, since the game is closing.See also
- How-To: Handle Save/Load Errors
- How-To: Build a Save/Load Menu
- API Reference -> Save Manager Subsystem -> Delegates