CrimsonSaveSystem · Lesson 3 of 8

Make a System Saveable

Beginner5 minSetupRuntime

Before you start

  • Completed: Enable the Plugin
  • A system with state worth saving (an inventory, a stats component…)
Video coming soon

Chapters

1. Implement the interface

Implement `ICrimsonSaveableSystem` on the object that owns the data and return a unique fragment name from GetFragmentName() — that name becomes the fragment's file on disk, so no two systems may share it.

A system implementing ICrimsonSaveableSystem with a unique fragment name.
Where to host it in Blueprint
A Blueprint can't be a Game Instance Subsystem — host the interface on an Actor or Actor Component instead (a manager actor in the level, or a component on the Game State).

2. Register with the manager

On startup (Initialize / BeginPlay), register with the manager subsystem so it knows to include you in every save and load:

cpp
// e.g. in your subsystem's Initialize or the actor's BeginPlay
UCrimsonSaveGameManagerSubsystem::Get(this)->RegisterSaveableSystem(this);

3. Mark the data

Flag every property to persist with `SaveGame` — the manager captures them automatically through a name-stable archive, so adding fields later doesn't break old saves.

The SaveGame flag on the properties to persist (Details → Advanced in Blueprint).
cpp
UPROPERTY(SaveGame)
TArray<FInventoryEntry> Items;
UPROPERTY(SaveGame)
int32 Gold = 0;
SaveGame alone does nothing
For systems, the flag is only honored because the owner implements the interface AND registered. Flagged data on an unregistered object is silently never saved. (World actors are the one exception — next lessons.)