UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FBaseAsyncSaveGameSystem Class Referenceabstract

#include <SaveGameSystem.h>

+ Inheritance diagram for FBaseAsyncSaveGameSystem:

Public Member Functions

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

Protected Member Functions

virtual UE::Tasks::FTask InternalDoesSaveGameExistAsync (const TCHAR *Name, FPlatformUserId PlatformUserId, FSaveGameAsyncExistsCallback Callback, TSharedPtr< ESaveExistsResult > OutResult=nullptr)=0
 
virtual UE::Tasks::FTask InternalSaveGameAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, TSharedRef< const TArray< uint8 > > Data, FSaveGameAsyncOpCompleteCallback Callback, TSharedPtr< bool > OutResult=nullptr)=0
 
virtual UE::Tasks::FTask InternalLoadGameAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, TSharedRef< TArray< uint8 > > Data, FSaveGameAsyncLoadCompleteCallback Callback, TSharedPtr< bool > OutResult=nullptr)=0
 
virtual UE::Tasks::FTask InternalDeleteGameAsync (bool bAttemptToUseUI, const TCHAR *Name, FPlatformUserId PlatformUserId, FSaveGameAsyncOpCompleteCallback Callback, TSharedPtr< bool > OutResult=nullptr)=0
 
virtual UE::Tasks::FTask InternalGetSaveGameNamesAsync (FPlatformUserId PlatformUserId, TSharedRef< TArray< FString > > FoundSaves, FSaveGameAsyncGetNamesCallback Callback, TSharedPtr< bool > OutResult=nullptr)=0
 
virtual ENGINE_API void WaitForAsyncTask (UE::Tasks::FTask AsyncSaveTask)
 
- 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

helper base class for async-compatible save games

Member Function Documentation

◆ DeleteGame()

bool FBaseAsyncSaveGameSystem::DeleteGame ( bool  bAttemptToUseUI,
const TCHAR Name,
const int32  UserIndex 
)
overridevirtual

Delete an existing save game, blocking until complete

Implements ISaveGameSystem.

◆ DeleteGameAsync()

void FBaseAsyncSaveGameSystem::DeleteGameAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
FSaveGameAsyncOpCompleteCallback  Callback 
)
overridevirtual

Reimplemented from ISaveGameSystem.

◆ DoesSaveGameExist()

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

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

Implements ISaveGameSystem.

◆ DoesSaveGameExistAsync()

void FBaseAsyncSaveGameSystem::DoesSaveGameExistAsync ( const TCHAR Name,
FPlatformUserId  PlatformUserId,
FSaveGameAsyncExistsCallback  Callback 
)
overridevirtual

Reimplemented from ISaveGameSystem.

◆ DoesSaveGameExistWithResult()

ISaveGameSystem::ESaveExistsResult FBaseAsyncSaveGameSystem::DoesSaveGameExistWithResult ( const TCHAR Name,
const int32  UserIndex 
)
overridevirtual

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

Implements ISaveGameSystem.

◆ GetSaveGameNames()

bool FBaseAsyncSaveGameSystem::GetSaveGameNames ( TArray< FString > &  FoundSaves,
const int32  UserIndex 
)
overridevirtual

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

Reimplemented from ISaveGameSystem.

◆ GetSaveGameNamesAsync()

void FBaseAsyncSaveGameSystem::GetSaveGameNamesAsync ( FPlatformUserId  PlatformUserId,
FSaveGameAsyncGetNamesCallback  Callback 
)
overridevirtual

Reimplemented from ISaveGameSystem.

◆ InternalDeleteGameAsync()

virtual UE::Tasks::FTask FBaseAsyncSaveGameSystem::InternalDeleteGameAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
FSaveGameAsyncOpCompleteCallback  Callback,
TSharedPtr< bool OutResult = nullptr 
)
protectedpure virtual

◆ InternalDoesSaveGameExistAsync()

virtual UE::Tasks::FTask FBaseAsyncSaveGameSystem::InternalDoesSaveGameExistAsync ( const TCHAR Name,
FPlatformUserId  PlatformUserId,
FSaveGameAsyncExistsCallback  Callback,
TSharedPtr< ESaveExistsResult OutResult = nullptr 
)
protectedpure virtual

◆ InternalGetSaveGameNamesAsync()

virtual UE::Tasks::FTask FBaseAsyncSaveGameSystem::InternalGetSaveGameNamesAsync ( FPlatformUserId  PlatformUserId,
TSharedRef< TArray< FString > >  FoundSaves,
FSaveGameAsyncGetNamesCallback  Callback,
TSharedPtr< bool OutResult = nullptr 
)
protectedpure virtual

◆ InternalLoadGameAsync()

virtual UE::Tasks::FTask FBaseAsyncSaveGameSystem::InternalLoadGameAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
TSharedRef< TArray< uint8 > >  Data,
FSaveGameAsyncLoadCompleteCallback  Callback,
TSharedPtr< bool OutResult = nullptr 
)
protectedpure virtual

◆ InternalSaveGameAsync()

virtual UE::Tasks::FTask FBaseAsyncSaveGameSystem::InternalSaveGameAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
TSharedRef< const TArray< uint8 > >  Data,
FSaveGameAsyncOpCompleteCallback  Callback,
TSharedPtr< bool OutResult = nullptr 
)
protectedpure virtual

◆ LoadGame()

bool FBaseAsyncSaveGameSystem::LoadGame ( bool  bAttemptToUseUI,
const TCHAR Name,
const int32  UserIndex,
TArray< uint8 > &  Data 
)
overridevirtual

Loads the game, blocking until complete

Implements ISaveGameSystem.

◆ LoadGameAsync()

void FBaseAsyncSaveGameSystem::LoadGameAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
FSaveGameAsyncLoadCompleteCallback  Callback 
)
overridevirtual

Reimplemented from ISaveGameSystem.

◆ LoadGameIfExistsAsync()

void FBaseAsyncSaveGameSystem::LoadGameIfExistsAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
FSaveGameAsyncLoadCompleteCallback  Callback 
)
overridevirtual

Reimplemented from ISaveGameSystem.

◆ SaveGame()

bool FBaseAsyncSaveGameSystem::SaveGame ( bool  bAttemptToUseUI,
const TCHAR Name,
const int32  UserIndex,
const TArray< uint8 > &  Data 
)
overridevirtual

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

Implements ISaveGameSystem.

◆ SaveGameAsync()

void FBaseAsyncSaveGameSystem::SaveGameAsync ( bool  bAttemptToUseUI,
const TCHAR Name,
FPlatformUserId  PlatformUserId,
TSharedRef< const TArray< uint8 > >  Data,
FSaveGameAsyncOpCompleteCallback  Callback 
)
overridevirtual

Reimplemented from ISaveGameSystem.

◆ WaitForAsyncTask()

void FBaseAsyncSaveGameSystem::WaitForAsyncTask ( UE::Tasks::FTask  AsyncSaveTask)
protectedvirtual

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