Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/UPackage
Description
Save one specific object asynchronously (along with any objects it references contained within the same Outer) into an Unreal package.
Some tasks might need to execute on the gamethread. If the engine isn't ticking, it might be required to pump the gamethread task queue manually. (i.e. FTaskGraphInterface::Get().ProcessThreadUntilIdle(ENamedThreads::GameThread) or similar).
| Name | SaveAsync |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/Package.h |
| Include Path | #include "UObject/Package.h" |
static UE::Tasks::TTask < FSavePackageResultStruct > SaveAsync
(
UPackage * InPackage,
UObject * InAsset,
const TCHAR * InFilename,
const FSavePackageArgs & SaveArgs
)
A task containing a FSavePackageResultStruct enum value with the result of saving a package as well as extra data
Parameters
| Name | Remarks |
|---|---|
| InPackage | the package to save the asset into |
| InAsset | the asset that should be saved into the package |
| Filename | the name to use for the new package file |
| SaveArgs | Extended arguments to control the save |