- Create SaveGame class
- Right-click → Blueprint Class → SaveGame → name
SG_Player. - Add variables:
int CoinCount,int Score.
- Right-click → Blueprint Class → SaveGame → name
- Add player vars
- In your Character BP add
int CoinCountandint Score(defaults 0).
- In your Character BP add
- Save flow (when you want to save)
- Node chain: Create Save Game Object (SG_Player) → set
CoinCount= Player.CoinCount,Score= Player.Score → Save Game to Slot (Slot Name:"PlayerSave", User Index:0).
- Node chain: Create Save Game Object (SG_Player) → set
- Load flow (BeginPlay or Continue)
- Does Save Game Exist(“PlayerSave”,0)? → if true: Load Game from Slot → cast to
SG_Player→ set Player.CoinCount = SG_Player.CoinCount and Player.Score = SG_Player.Score → Update UI.
- Does Save Game Exist(“PlayerSave”,0)? → if true: Load Game from Slot → cast to
- Update UI
- Either bind Widget to Player vars or create
UpdateCoins(int)/UpdateScore(int)in the widget and call them right after loading or after changing values.
- Either bind Widget to Player vars or create
- When to call Save
- Call Save on coin pickup, on checkpoints, on level complete, or on game exit. (Prefer checkpoints or explicit saves to avoid heavy I/O each frame.)
- Use GameInstance for cross-level
- Put
SavePlayerData()/LoadPlayerData()functions in your GameInstance to keep logic centralized and accessible across levels.
- Put
- Test
- Play → collect coins/change score → trigger Save → stop → Play → Load → confirm values restored.


Pro tips (quick):
- Use Async Save Game to Slot to avoid frame hitches.
- Add a
SaveVersionint toSG_Playerfor future-proofing. - Use unique slot names for multiple profiles (e.g.,
"PlayerSave_1").





