How-To: Build a Save/Load Menu
Goal: build a menu that lists existing save slots with their metadata, and can start a new game, load a slot, or delete one.
Prerequisites
You can trigger a save (see Quick Start: Saveable Systems). This page uses the raw
UCrimsonSaveGameManagerSubsystem; the UCrimsonSaveFacade Blueprint library offers the same actions in one call each.1. List the slots
GetAllSaveSlotHeaders scans the save directory and returns one UCrimsonSaveGameHeader per manual slot (auto/quick-save slots are excluded). Read each header's metadata to build a row.
Verify
Create two named saves, open the menu - both rows appear with the correct names, timestamps, and play time.
2. New game, load, delete
Bind the menu buttons to the slot actions. UCrimsonSaveFacade wraps each in a single call; the raw subsystem exposes the same operations.
Delete is irreversible
RequestDeleteSlot removes every file in the slot directory. Confirm with the player before calling it.3. Refresh the list when it changes
Saves and loads are event-driven. Bind OnSaveSlotListChanged to rebuild the list after a slot is created or deleted, and OnLoadComplete to know when a load has actually finished before switching screens.
SaveMgr->OnSaveSlotListChanged.AddDynamic(this, &UMySaveMenu::Rebuild);SaveMgr->OnLoadComplete.AddDynamic(this, &UMySaveMenu::HandleLoadComplete);
Header metadata fields
Each row comes from a
UCrimsonSaveGameHeader:| Field | Type | Use |
|---|---|---|
DisplayName | FText | User-facing slot name (e.g. the character name entered at new game). |
SlotType | ECrimsonSaveSlotType | Manual / AutoSave / QuickSave - filter which slots the menu shows. |
SaveDateTime | FDateTime | When the save was written. |
PlayTime | FTimespan | Total playtime accumulated in the slot. |
ThumbnailData | TArray<uint8> | Optional screenshot captured at save time. |
See also
- How-To: Handle Save/Load Errors - resilient feedback when a slot is corrupt
- How-To: Custom Fragments & Versioning - add custom header fields (chapter, portrait)
- API Reference -> Save Manager Subsystem - the full slot/header API