ue-save-and-load

Implements save and load persistence in Unreal Engine C++ using USaveGame and UGameplayStatics.

55|5|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-save-and-load-kevinpbuckley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ue-save-and-load
Source: https://github.com/kevinpbuckley/unreal-engine-skills/tree/main/skills/core/ue-save-and-load
Command: npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-save-and-load-kevinpbuckley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Persisting game state in Unreal Engine requires knowing the correct SaveGame APIs, serialization flags, and versioning patterns; mistakes cause lost progress, corrupt saves, or hitches during gameplay. This Skill provides the exact UE 5.8 classes, function signatures, and patterns for reliable save/load implementation. ## Core Features & Use Cases - Slot-based save/load: Create, save, load, and delete named save slots via UGameplayStatics, with synchronous and async variants (AsyncSaveGameToSlot, AsyncLoadGameFromSlot) to avoid blocking the game thread. - Actor state serialization: Capture dynamic actor state into byte arrays using UPROPERTY(SaveGame), FMemoryWriter/FMemoryReader, and FObjectAndNameAsStringProxyArchive with the ArIsSaveGame flag. - Versioning and migration: Add SaveVersion fields, migrate old saves in PostLoad, and use ULocalPlayerSaveGame hooks (HandlePostLoad, GetLatestDataVersion) for per-user saves. - Use Case: A player opens chests and defeats enemies in a level; at a checkpoint, the game captures each saveable actor's state into a USaveGame object and writes it asynchronously to a slot, then restores everything on the next session. ## Quick Start Ask the agent to implement a save system that persists player progress and opened chests to a named slot using USaveGame and async save in Unreal Engine 5.8.

Frequently Asked Questions about ue-save-and-load

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save and load game data in Unreal Engine C++?

Create a USaveGame subclass with UPROPERTY members, then call UGameplayStatics::CreateSaveGameObject, SaveGameToSlot, and LoadGameFromSlot with a slot name and user index. Always null-check the loaded object before use.

How to serialize actor state into a Unreal save game?

Mark actor properties with UPROPERTY(SaveGame), then serialize the actor with FMemoryWriter wrapped in FObjectAndNameAsStringProxyArchive with ArIsSaveGame set to true. Store the resulting byte array inside your USaveGame object and reverse the process with FMemoryReader on load.

Does UPROPERTY(SaveGame) do anything on a USaveGame class?

No. On a USaveGame object, all non-transient UPROPERTYs are serialized regardless of the SaveGame specifier. The specifier only matters when serializing actors with an archive whose ArIsSaveGame flag is set, where it filters which properties get written.

Why does LoadGameFromSlot return null in Unreal Engine?

LoadGameFromSlot returns null when the slot does not exist, the save file is corrupt, or the saved class no longer matches. Check DoesSaveGameExist first to distinguish a missing save from a corrupt one, and always create a fresh save object as a fallback.

Should I use synchronous or async save in Unreal Engine?

Use AsyncSaveGameToSlot and AsyncLoadGameFromSlot for any save triggered during active gameplay, since synchronous calls block the game thread and cause visible hitches on large data. The async variants take delegates that fire on the game thread when complete.

How do I migrate old save files after changing fields?

Add an int32 SaveVersion UPROPERTY from day one and increment it on breaking schema changes. Override PostLoad to detect older versions and migrate deprecated fields, or use ULocalPlayerSaveGame's HandlePostLoad hook with GetSavedDataVersion for structured versioning.