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

#include <IOSSaveGameSystem.h>

+ Inheritance diagram for FIOSSaveGameSystem:

Public Member Functions

 FIOSSaveGameSystem ()
 
virtual ~FIOSSaveGameSystem ()
 
virtual bool PlatformHasNativeUI () override
 
virtual bool DoesSaveSystemSupportMultipleUsers () override
 
virtual bool GetSaveGameNames (TArray< FString > &FoundSaves, const int32 UserIndex) override
 
virtual bool DoesSaveGameExist (const TCHAR *Name, const int32 UserIndex) override
 
virtual ESaveExistsResult DoesSaveGameExistWithResult (const TCHAR *Name, const int32 UserIndex) override
 
virtual bool SaveGame (bool bAttemptToUseUI, const TCHAR *Name, const int32 UserIndex, const TArray< uint8 > &Data) override
 
 DECLARE_DELEGATE_RetVal_OneParam (bool, FUpdateCloudDataFromLocalSave, const FString &)
 
virtual bool LoadGame (bool bAttemptToUseUI, const TCHAR *Name, const int32 UserIndex, TArray< uint8 > &Data) override
 
 DECLARE_DELEGATE_RetVal_OneParam (bool, FUpdateLocalSaveFileFromCloud, const FString &)
 
virtual bool DeleteGame (bool bAttemptToUseUI, const TCHAR *Name, const int32 UserIndex) override
 
 DECLARE_DELEGATE_OneParam (FDeleteCloudData, const FString &)
 
- 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)
 

Public Attributes

FUpdateCloudDataFromLocalSave OnUpdateCloudDataFromLocalSave
 
FUpdateLocalSaveFileFromCloud OnUpdateLocalSaveFileFromCloud
 
FDeleteCloudData OnDeleteCloudData
 

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
 
- Protected Member Functions inherited from ISaveGameSystem
ENGINE_API void OnAsyncComplete (TFunction< void()> Callback)
 
- Static Protected Attributes inherited from ISaveGameSystem
static ENGINE_API UE::Tasks::FPipe AsyncTaskPipe { TEXT("SaveGamePipe") }
 

Constructor & Destructor Documentation

◆ FIOSSaveGameSystem()

FIOSSaveGameSystem::FIOSSaveGameSystem ( )

◆ ~FIOSSaveGameSystem()

FIOSSaveGameSystem::~FIOSSaveGameSystem ( )
virtual

Member Function Documentation

◆ DECLARE_DELEGATE_OneParam()

FIOSSaveGameSystem::DECLARE_DELEGATE_OneParam ( FDeleteCloudData  ,
const FString &   
)

We call this to delete a save file from a listening Cloud subsystem.

◆ DECLARE_DELEGATE_RetVal_OneParam() [1/2]

FIOSSaveGameSystem::DECLARE_DELEGATE_RetVal_OneParam ( bool  ,
FUpdateCloudDataFromLocalSave  ,
const FString &   
)

We call this to notify any listening Cloud subsystem that we have updated a save file.

◆ DECLARE_DELEGATE_RetVal_OneParam() [2/2]

FIOSSaveGameSystem::DECLARE_DELEGATE_RetVal_OneParam ( bool  ,
FUpdateLocalSaveFileFromCloud  ,
const FString &   
)

We call this to refresh a save file from a listening Cloud subsystem, before we open it.

◆ DeleteGame()

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

Delete an existing save game, blocking until complete

Implements ISaveGameSystem.

◆ DoesSaveGameExist()

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

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

Implements ISaveGameSystem.

◆ DoesSaveGameExistWithResult()

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

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

Implements ISaveGameSystem.

◆ DoesSaveSystemSupportMultipleUsers()

virtual bool FIOSSaveGameSystem::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()

bool FIOSSaveGameSystem::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.

◆ LoadGame()

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

Loads the game, blocking until complete

Implements ISaveGameSystem.

◆ PlatformHasNativeUI()

virtual bool FIOSSaveGameSystem::PlatformHasNativeUI ( )
inlineoverridevirtual

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

Implements ISaveGameSystem.

◆ SaveGame()

bool FIOSSaveGameSystem::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.

Member Data Documentation

◆ OnDeleteCloudData

FDeleteCloudData FIOSSaveGameSystem::OnDeleteCloudData

◆ OnUpdateCloudDataFromLocalSave

FUpdateCloudDataFromLocalSave FIOSSaveGameSystem::OnUpdateCloudDataFromLocalSave

◆ OnUpdateLocalSaveFileFromCloud

FUpdateLocalSaveFileFromCloud FIOSSaveGameSystem::OnUpdateLocalSaveFileFromCloud

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