Skip to content

Step 10: Persistent & Custom Objects

BavGames edited this page Jul 23, 2026 · 5 revisions

Not everything lives on an actor. Quest logs, world flags, profile settings - any UObject with SaveGame variables can be saved under a key, without a Saveable Component.

Custom Objects - "belongs to this save"

Register Custom Object (Key, Object) saves the object's SaveGame variables inside the current slot. Different slots hold different values. Use it for anything that is part of one playthrough:

  • Quest log / story progress
  • World flags ("bridge destroyed", "merchant unlocked")
  • Game-mode state that has no actor

Persistent Objects - "belongs to the player"

Register Persistent Object (Key, Object) saves the object's SaveGame variables in a shared file that every slot sees. Use it for things that must survive slot changes:

  • Player profile (name, total play time)
  • Unlocks and achievements progress
  • Anything a "New Game" should NOT reset

Usage pattern

Register once, early - Game Instance Init is the natural place. Registration is sticky: every save captures the object, every load restores it.

image
Game Instance > Event Init
  -> Register Custom Object    (Key: "QuestLog",  Object: QuestLog ref)
  -> Register Persistent Object (Key: "Profile",  Object: Profile ref)

Registering after a load is also safe: if the slot already contains data for that key, it is applied to the object immediately.

Unregister only when the object should stop being saved (rare) - objects do not need to be unregistered on shutdown.

Notes

  • Keys are FNames; keep them stable across versions (they are your data's identity).
  • The data lives in a sidecar next to the slot file (.global), so world data and object data never corrupt each other.
  • Multiplayer: registration and restore happen on the server, like everything else.

Next: Step 11: Save Versions & Migration

Clone this wiki locally