UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGenericSaveGameSystem Class Reference

#include <SaveGameSystem.h>

+ Inheritance diagram for FGenericSaveGameSystem:

Public Member Functions

virtual bool PlatformHasNativeUI () override
 
virtual bool DoesSaveSystemSupportMultipleUsers () override
 
virtual ESaveExistsResult DoesSaveGameExistWithResult (const TCHAR *Name, const int32 UserIndex) override
 
virtual bool DoesSaveGameExist (const TCHAR *Name, const int32 UserIndex) override
 
virtual bool GetSaveGameNames (TArray< FString > &FoundSaves, const int32 UserIndex) override
 
virtual bool SaveGame (bool bAttemptToUseUI, const TCHAR *Name, const int32 UserIndex, const TArray< uint8 > &Data) override
 
virtual bool LoadGame (bool bAttemptToUseUI, const TCHAR *Name, const int32 UserIndex, TArray< uint8 > &Data) override
 
virtual bool DeleteGame (bool bAttemptToUseUI, const TCHAR *Name, const int32 UserIndex) override
 
- Public Member Functions inherited from ISaveGameSystem
virtual ENGINE_API void DoesSaveGameExistAsync (const TCHAR *Name, FPlatformUserId PlatformUserId, FSaveGameAsyncExistsCallback Callback)
 
virtual ENGINE_API void SaveGameAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, TSharedRef< const TArray< uint8 > > Data, FSaveGameAsyncOpCompleteCallback Callback)
 
virtual ENGINE_API void LoadGameAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, FSaveGameAsyncLoadCompleteCallback Callback)
 
virtual ENGINE_API void LoadGameIfExistsAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, FSaveGameAsyncLoadCompleteCallback Callback)
 
virtual ENGINE_API void DeleteGameAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, FSaveGameAsyncOpCompleteCallback Callback)
 
virtual ENGINE_API void GetSaveGameNamesAsync (FPlatformUserId PlatformUserId, FSaveGameAsyncGetNamesCallback Callback)
 
virtual ENGINE_API void InitAsync (bool bAttemptToUseUI, FPlatformUserId PlatformUserId, FSaveGameAsyncInitCompleteCallback Callback)
 

Protected Member Functions

virtual FString GetSaveGamePath (const TCHAR *Name)
 
- Protected Member Functions inherited from ISaveGameSystem
ENGINE_API void OnAsyncComplete (TFunction< void()> Callback)
 

Additional Inherited Members

- Public Types inherited from ISaveGameSystem
enum class  ESaveExistsResult { OK , DoesNotExist , Corrupt , UnspecifiedError }
 
typedef TFunction< void(const FString &, FPlatformUserId, bool)> FSaveGameAsyncOpCompleteCallback
 
typedef TFunction< void(const FString &, FPlatformUserId, bool, const TArray< uint8 > &)> FSaveGameAsyncLoadCompleteCallback
 
typedef TFunction< void(const FString &, FPlatformUserId, ISaveGameSystem::ESaveExistsResult)> FSaveGameAsyncExistsCallback
 
typedef TFunction< void(FPlatformUserId, bool)> FSaveGameAsyncInitCompleteCallback
 
typedef TFunction< void(FPlatformUserId, bool, const TArray< FString > &)> FSaveGameAsyncGetNamesCallback
 
- Static Protected Attributes inherited from ISaveGameSystem
static ENGINE_API UE::Tasks::FPipe AsyncTaskPipe { TEXT("SaveGamePipe") }
 

Detailed Description

A generic save game system that just uses IFileManager to save/load with normal files

Member Function Documentation

◆ DeleteGame()

virtual bool FGenericSaveGameSystem::DeleteGame ( bool  bAttemptToUseUI,
const TCHAR Name,
const int32  UserIndex 
)
inlineoverridevirtual

Delete an existing save game, blocking until complete

Implements ISaveGameSystem.

◆ DoesSaveGameExist()

virtual bool FGenericSaveGameSystem::DoesSaveGameExist ( const TCHAR Name,
const int32  UserIndex 
)
inlineoverridevirtual

Return true if the named savegame exists (probably not useful with NativeUI

Implements ISaveGameSystem.

◆ DoesSaveGameExistWithResult()

virtual ESaveExistsResult FGenericSaveGameSystem::DoesSaveGameExistWithResult ( const TCHAR Name,
const int32  UserIndex 
)
inlineoverridevirtual

Similar to DoesSaveGameExist, except returns a result code with more information.

Implements ISaveGameSystem.

◆ DoesSaveSystemSupportMultipleUsers()

virtual bool FGenericSaveGameSystem::DoesSaveSystemSupportMultipleUsers ( )
inlineoverridevirtual

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.

Implements ISaveGameSystem.

◆ GetSaveGameNames()

virtual bool FGenericSaveGameSystem::GetSaveGameNames ( TArray< FString > &  FoundSaves,
const int32  UserIndex 
)
inlineoverridevirtual

Gets a list of all known saves. This isn't possible on all platforms.

Reimplemented from ISaveGameSystem.

◆ GetSaveGamePath()

virtual FString FGenericSaveGameSystem::GetSaveGamePath ( const TCHAR Name)
inlineprotectedvirtual

Get the path to save game file for the given name, a platform may be able to simply override this and no other functions above

◆ LoadGame()

virtual bool FGenericSaveGameSystem::LoadGame ( bool  bAttemptToUseUI,
const TCHAR Name,
const int32  UserIndex,
TArray< uint8 > &  Data 
)
inlineoverridevirtual

Loads the game, blocking until complete

Implements ISaveGameSystem.

◆ PlatformHasNativeUI()

virtual bool FGenericSaveGameSystem::PlatformHasNativeUI ( )
inlineoverridevirtual

Returns true if the platform has a native UI (like many consoles)

Implements ISaveGameSystem.

◆ SaveGame()

virtual bool FGenericSaveGameSystem::SaveGame ( bool  bAttemptToUseUI,
const TCHAR Name,
const int32  UserIndex,
const TArray< uint8 > &  Data 
)
inlineoverridevirtual

Saves the game, blocking until complete. Platform may use FGameDelegates to get more information from the game

Implements ISaveGameSystem.


The documentation for this class was generated from the following file: