engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
UAsyncActionHandleSaveGame类 参考

Async action to handle async load/save of a USaveGame. 更多...

#include <AsyncActionHandleSaveGame.h>

继承自 UBlueprintAsyncActionBase .

Public 成员函数

virtual void Activate () override
 Execute the actual operation
 

静态 Public 成员函数

static UAsyncActionHandleSaveGame * AsyncLoadGameFromSlot (UObject *WorldContextObject, const FString &SlotName, const int32 UserIndex)
 Schedule an async load of a specific slot. 更多...
 
static UAsyncActionHandleSaveGame * AsyncSaveGameToSlot (UObject *WorldContextObject, USaveGame *SaveGameObject, const FString &SlotName, const int32 UserIndex)
 Schedule an async save to a specific slot. 更多...
 

Public 属性

FOnAsyncHandleSaveGame Completed
 Delegate called when the save/load completes
 

Protected 成员函数

virtual void ExecuteCompleted (bool bSuccess)
 Called at completion of save/load to execute delegate
 
virtual void HandleAsyncSave (const FString &SlotName, const int32 UserIndex, bool bSuccess)
 Function callbacks for load/save
 

Protected 属性

ESaveGameOperation Operation
 Which operation is being run
 
USaveGame * SaveGameObject
 The object that was either saved or loaded
 
FString SlotName
 Slot/user to use
 

详细描述

Async action to handle async load/save of a USaveGame.

This can be subclassed by a specific game

成员函数说明

◆ AsyncLoadGameFromSlot()

static UAsyncActionHandleSaveGame * UAsyncActionHandleSaveGame::AsyncLoadGameFromSlot ( UObject *  WorldContextObject,
const FString &  SlotName,
const int32  UserIndex 
)
static

Schedule an async load of a specific slot.

UGameplayStatics::AsyncLoadGameFromSlot is the native version of this. When the load has succeeded or failed, the completed pin is activated with success/failure and the newly loaded save game object if valid. Keep in mind that some platforms may not support trying to load and save at the same time.

参数
SlotNameName of the save game slot to load from.
UserIndexFor some platforms, master user index to identify the user doing the loading.

◆ AsyncSaveGameToSlot()

static UAsyncActionHandleSaveGame * UAsyncActionHandleSaveGame::AsyncSaveGameToSlot ( UObject *  WorldContextObject,
USaveGame *  SaveGameObject,
const FString &  SlotName,
const int32  UserIndex 
)
static

Schedule an async save to a specific slot.

UGameplayStatics::AsyncSaveGameToSlot is the native version of this. When the save has succeeded or failed, the completed pin is activated with success/failure and the save game object. Keep in mind that some platforms may not support trying to load and save at the same time.

参数
SaveGameObjectObject that contains data about the save game that we want to write out.
SlotNameName of the save game slot to load from.
UserIndexFor some platforms, master user index to identify the user doing the loading.

该类的文档由以下文件生成: