Navigation
API > API/Runtime > API/Runtime/Engine
Inheritance Hierarchy
- ISaveGameSystem
- FBaseAsyncSaveGameSystem
- FGenericSaveGameSystem
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/SaveGameSystem.h |
| Include | #include "SaveGameSystem.h" |
Syntax
class ISaveGameSystem
Remarks
Interface for platform feature modulesDefines the interface to platform's save game system (or a generic file based one)
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | DeleteGame
(
bool bAttemptToUseUI, |
Delete an existing save game, blocking until complete | |
| void | DeleteGameAsync
(
bool bAttemptToUseUI, |
Delete the named savegame asyncronously. | |
| bool | DoesSaveGameExist
(
const TCHAR* Name, |
Return true if the named savegame exists (probably not useful with NativeUI | |
| void | DoesSaveGameExistAsync
(
const TCHAR* Name, |
Asyncronously checks if the named savegame exists. | |
| ESaveExistsResult | DoesSaveGameExistWithResult
(
const TCHAR* Name, |
Similar to DoesSaveGameExist, except returns a result code with more information. | |
| bool | Some save systems don't support more than one user, in those cases the game needs to avoid saving settings for anyone but the primary user. | ||
| bool | GetSaveGameNames
(
TArray< FString >& FoundSaves, |
Gets a list of all known saves. This isn't possible on all platforms. | |
| void | GetSaveGameNamesAsync
(
FPlatformUserId PlatformUserId, |
Gets a list of all known saves if the platform supports it. | |
| void | InitAsync
(
bool bAttemptToUseUI, |
(Optional) initialise the save system for the given user. | |
| bool | Loads the game, blocking until complete | ||
| void | LoadGameAsync
(
bool bAttemptToUseUI, |
Load the named savegame asyncronously. | |
| void | OnAsyncComplete
(
TFunction< void()> Callback |
Helper function for calling back to the game thread when an async save operation has completed | |
| bool | Returns true if the platform has a native UI (like many consoles) | ||
| bool | Saves the game, blocking until complete. | ||
| void | SaveGameAsync
(
bool bAttemptToUseUI, |
Saves the named savegame asyncronously. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ESaveExistsResult | Possible result codes when using DoesSaveGameExist. |
Typedefs
| Name | Description |
|---|---|
| FSaveGameAsyncExistsCallback | Indicates that an async savegame exists check has completed. SlotName, PlatformUserId, save exists result. Should always be called from the gamethread. |
| FSaveGameAsyncGetNamesCallback | Indicates that an async savegame list names has completed. PlatformUserId, bool=success, FoundSaves. Should always be called from the game thread |
| FSaveGameAsyncInitCompleteCallback | Indicates that an async savegame initialize has completed. PlatformUserId, bool=success. Should always be called from the gamethread. |
| FSaveGameAsyncLoadCompleteCallback | Indicates that an async savegame load has completed. SlotName, PlatformUserId, bool=success, SavedData. Should always be called from the gamethread. |
| FSaveGameAsyncOpCompleteCallback | Indicates that an async savegame operation has completed. SlotName, PlatformUserId, bool=success. Should always be called from the gamethread. |
Constants
| Name | Description |
|---|---|
| AsyncTaskPipe | Save task pipe prevents multiple async save operations happening in parallel. note that the order is not guaranteed |