ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
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',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-serialization-savegames -a windsurf -y
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"
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`.
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` 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`) |
The async entry points take plain (non-dynamic) delegates, so the bound function must **not** be a `UFUNCTION`:
// 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
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.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…