Saving a Game

This is an asynchronous function which allows you to save a game to a snapshot in Google Play Services.

The parameters include the name of the slot to save to, a description of the save game, the amount of time played, a progress value, the save game object to be saved and the conflict resolution policy to be used.
Once the asynchronous operation has completed, one of two delegates will be called to handle the success and failure situations.

1

Slot Name

The slot name is a string that uniquely identifies the slot where the save game will be stored. A slot represents a specific point in time that the game was saved, and multiple snapshots can be stored under different slot names. Providing a new slot name will result in a new snapshot, whereas if it already exists, it will overwrite the existing slots data.

2

Save Game Description

A brief description of the saved game data. This can be used to help the player identify different saved games in the future. This value is stored in the Snapshots metadata.

3

Played Time

The amount of time that the player has spent playing the game, in milliseconds. This value is typically used to track progress and help the player resume from where they left off in the game. This value is stored in the Snapshots metadata and can optionally be used in a provided conflict resolution strategy.

4

Progress Value

A numeric value representing the player's progress in the game. This can be used to track the player's progress and help them resume from the correct point in the game. This value is stored in the Snapshots metadata and can optionally be used in a provided conflict resolution strategy.

5

Save Game Object

The game data that will be saved to the snapshot. This can be any object that extends UObject in Unreal Engine. This can include data such as player inventory, level progress, and game settings.

6

Conflict Resolution Policy

The Resolution Policy to be used when there is a conflict between the locally saved snapshot and the snapshot stored on the server. This policy determines which snapshot will be used and how the conflict will be resolved behind the scenes.

7

On Success

A delegate that will be called when the snapshot is successfully saved. This can be used to notify the player or perform other actions in the game once the snapshot has successfully been saved. You can simply click and drag this pin to create a custom event.

8

On Failure

A delegate that will be called if there is an error during the snapshot save operation. The delegate will produce an Snapshot Error type for the developer to handle appropriately. You can simply click and drag this pin to create a custom event.