Skip to content
AI & Agents
Skill

/ue-serialization-savegames

Use when implementing save/load, player progress persistence, slot management, or binary serialization in Unreal Engine C++. Also use when the user mentions 'save game', 'USaveGame', 'SaveGameToSlot', 'AsyncSaveGameToSlot', 'LoadGameFromSlot', 'DoesSaveGameExist',

From plugin
unreal-engine-skills
46831 skills

Claude Code

$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames --agent claude-code

SKILL.md

ue-serialization-savegames.SKILL.md
name: ue-serialization-savegames
description: "Use when implementing save/load, player progress persistence, slot management, or binary serialization in Unreal Engine C++. Also use when the user mentions 'save game', 'USaveGame', 'SaveGameToSlot', 'AsyncSaveGameToSlot', 'LoadGameFromSlot', 'DoesSaveGameExist', 'DeleteGameInSlot', 'ULocalPlayerSaveGame', 'UPROPERTY(SaveGame)', 'FArchive', 'FMemoryWriter', 'FCustomVersion', 'save versioning', 'migrate old saves', 'save file corrupted', 'UDeveloperSettings', or 'GConfig'. For asset references, see ue-data-assets-tables; for work off the game thread, see ue-async-threading; for streamed level state, see ue-world-level-streaming."
metadata:
  version: "2.0.0"
  engine: "5.8"

UE Serialization & Save Games

Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

This skill covers persisting game state: `USaveGame` objects through `UGameplayStatics`, the platform `ISaveGameSystem`, `FArchive` binary serialization, `UPROPERTY(SaveGame)` actor snapshots, save versioning, and config/settings storage. Build.cs modules: `Core`, `CoreUObject`, `Engine`; add `DeveloperSettings` to `PublicDependencyModuleNames` for `UDeveloperSettings`, and `Json` + `JsonUtilities` to `PrivateDependencyModuleNames` for `FJsonObjectConverter`.

Context

Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

| Request is about… | Go to | |---|---| | A save object, slot names, save/load/delete | [USaveGame and the Slot API](#usavegame-and-the-slot-api) | | Not blocking the game thread, callbacks | [Async Save and Load](#async-save-and-load) | | Per-player saves, settings profiles, split-screen | [ULocalPlayerSaveGame](#ulocalplayersavegame) | | Raw bytes, `FArchive`, memory buffers | [FArchive and Binary Serialization](#farchive-and-binary-serialization) | | Snapshotting actors, world state, transforms | [Actor State with UPROPERTY(SaveGame)](#actor-state-with-upropertysavegame) | | A `USTRUCT` needing its own `Serialize`; old saves breaking after a patch | [USTRUCT Custom Serialization](#ustruct-custom-serialization), [Versioning](#versioning) | | Console/cloud storage, slot enumeration, save UI | [ISaveGameSystem and Platform Storage](#isavegamesystem-and-platform-storage) | | Project settings, user options, `.ini`, JSON, compression | [Config, Settings, and File Formats](#config-settings-and-file-formats) | | Slot manager subsystem, metadata, thumbnails, checksums, encryption | [Save system architecture](references/save-system-architecture.md) |

USaveGame and the Slot API

`USaveGame` is an abstract `UObject` declared in `GameFramework/SaveGame.h:23`. Subclass it, add `UPROPERTY` fields, and route everything through `UGameplayStatics`.

**`UGameplayStatics::SaveGameToSlot` writes every non-transient `UPROPERTY`** — it does not filter on the `SaveGame` flag (`Kismet/GameplayStatics.h:1159`). Mark fields `Transient` to exclude them. The `SaveGame` specifier only matters for archives with `ArIsSaveGame` set — see [Actor State](#actor-state-with-upropertysavegame).

// MySaveGame.h
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/SaveGame.h"
#include "UObject/SoftObjectPath.h"
#include "MySaveGame.generated.h"

USTRUCT(BlueprintType)
struct FMyInventoryItem
{
    GENERATED_BODY()

    UPROPERTY(SaveGame) FName ItemId;
    UPROPERTY(SaveGame) int32 Quantity = 0;
};

UCLASS(BlueprintType)
class MYGAME_API UMySaveGame : public USaveGame
{
    GENERATED_BODY()

public:
    UPROPERTY(SaveGame) int32 SaveVersion = 0;   // bump alongside MySaveStage::Latest
    UPROPERTY(SaveGame) float PlayerHealth = 100.f;
    UPROPERTY(SaveGame) FVector LastCheckpoint = FVector::ZeroVector;
    UPROPERTY(SaveGame) TArray<FMyInventoryItem> InventoryItems;
    UPROPERTY(SaveGame) TMap<FName, int32> AbilityLevels;

    /** Store asset references as paths; a hard pointer cannot round-trip through a file. */
    UPROPERTY(SaveGame) FSoftObjectPath LastEquippedWeapon;

    /** Excluded from SaveGameToSlot because it is Transient. */
    UPROPERTY(Transient) float RuntimeOnlyScratch = 0.f;
};

Slot functions, all static on `UGameplayStatics` (`Kismet/GameplayStatics.h`):

| Call | Signature | |---|---| | `CreateSaveGameObject` | `USaveGame* (TSubclassOf<USaveGame> SaveGameClass)` (`:1124`) | | `SaveGameToSlot` | `bool (USaveGame*, const FString& SlotName, const int32 UserIndex)` (`:1167`) | | `LoadGameFromSlot` | `USaveGame* (const FString& SlotName, const int32 UserIndex)` (`:1211`) | | `DoesSaveGameExist` | `bool (const FString& SlotName, const int32 UserIndex)` (`:1175`) | | `DeleteGameInSlot` | `bool (const FString& SlotName, const int32 UserIndex)` (`:1231`) | | `SaveGameToMemory` | `bool (USaveGame*, TArray<uint8>& OutSaveData)` (`:1134`) | | `LoadGameFromMemory` | `USaveGame* (const TArray<uint8>& InSaveData)` (`:1182`) | | `SaveDataToSlot` | `bool (const TArray<uint8>&, const FString& SlotName, const int32 UserIndex)` (`:1143`) | | `LoadDataFromSlot` | `bool (TArray<uint8>&, const FString& SlotName, const int32 UserIndex)` (`:1191`) |

Async Save and Load

The async entry points take plain (non-dynamic) delegates, so the bound function must **not** be a `UFUNCTION`:

  • `DECLARE_DELEGATE_ThreeParams(FAsyncSaveGameToSlotDelegate, const FString&, const int32, bool)` (`GameplayStatics.h:44`)
  • `DECLARE_DELEGATE_ThreeParams(FAsyncLoadGameFromSlotDelegate, const FString&, const int32, USaveGame*)` (`GameplayStatics.h:47`)
// MySaveSubsystem.h
#pragma once

#include "CoreMinimal.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "MySaveSubsystem.generated.h"

class UMySaveGame; class USaveGame;

UCLASS()
class MYGAME_API UMySaveSubsystem : public UGameIn
Read more
@quodsoler
Ships withunreal-engine-skills

A collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.

Stars on GitHub

Momentum

stars in total
468
Star history of quodsoler/unreal-engine-skills on GitHub, a chart by star-history.com

Other skills on unreal-engine-skills.

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3w393k
@openclaw@openclawInstall Skill

Questions about ue-serialization-savegames.

Which coding agents can use ue-serialization-savegames?
ue-serialization-savegames installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.