Cloud Saves Examples
This section provides practical examples of using Steam Cloud Saves in Unreal Engine projects to persist player progress, restore saved data across sessions, and manage cloud-stored save files.
All examples below are shown using Blueprint nodes, with equivalent functionality available through the C++ API.
Prerequisites
Before using any Cloud Saves-related nodes, the following conditions must be met:
- Steam Cloud must be enabled for the application in Steamworks
- Steam Cloud must be enabled for the current user account
Steam Cloud configuration is managed through Steamworks and must be completed before cloud save functionality becomes available at runtime.
Saving a Game to Steam Cloud
This example demonstrates how to save a USaveGame object to Steam Cloud under a specified file name.
The Save Game to Cloud node is typically called after updating gameplay progress, during checkpoints, or when the player exits the game.
The operation is asynchronous and reports the result through the On Success and On Failure callbacks.
- On success, the save data is serialized and uploaded to Steam Cloud.
- On failure, an error message is returned, which can be used for logging or fallback handling.
In most projects, the file name represents a save slot identifier, such as SaveSlot_1, AutoSave, or a profile-specific key.
Loading a Game from Steam Cloud
This example shows how to load a previously saved USaveGame object from Steam Cloud.
The Load Game from Cloud node is commonly used during game startup or when the player selects a save slot from a menu.
The request is asynchronous and returns a USaveGame object through the On Success callback.
The returned save object can then be cast to the appropriate SaveGame class and applied to restore player state, progression, settings, or world data.
If the file does not exist or cannot be loaded, the On Failure callback is triggered, allowing the game to handle first-time launches or recovery scenarios.
Checking If a Cloud Save Exists
Before attempting to load data from Steam Cloud, it is often useful to verify whether a specific save file exists.
This example demonstrates using the Cloud Save Exists node to conditionally branch logic based on file availability.
This approach is typically used during startup to decide whether to load existing progress or create a new save file.
Checking for existence helps avoid unnecessary load failures and allows for a cleaner user experience on first launch.
Enumerating Cloud Save Files
In this example, the Enumerate Cloud Saves node is used to retrieve a list of all save files currently stored in Steam Cloud for the application.
The operation returns an array of FSteamCloudFileInfo structures, each containing metadata such as file name and size.
This approach is commonly used when implementing multiple save slots, building a load-game menu, or providing save management tools to the player.
The returned list can be cached and reused for UI rendering or further operations such as loading or deleting specific saves.
Important Notes
- File names must be consistent between save and load operations
- Steam Cloud must be enabled both for the application and the user account
- All save and load operations are asynchronous and must be handled through callbacks
- Cloud Saves are synchronized by Steam and may not be immediately available on another device
- Large or overly frequent save operations may impact performance or exceed quota limits