Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/UObject > API/Runtime/CoreUObject/UObject/LoadPackageAsync
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h |
| Include | #include "UObject/UObjectGlobals.h" |
| Source | /Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp |
int32 LoadPackageAsync
(
const FPackagePath & InPackagePath,
FName InPackageNameToCreate,
FLoadPackageAsyncDelegate InCompletionDelegate,
EPackageFlags InPackageFlags,
int32 InPIEInstanceID,
TAsyncLoadPriority InPackagePriority,
const FLinkerInstancingContext * InstancingContext,
uint32 LoadFlags
)
Remarks
Asynchronously load a package and all contained objects that match context flags. Non-blocking. Use this version to specify the PackagePath rather than having the other versions internally convert the InName to a PackagePath by searching the current package mount points. Use this version if you need to specify a packagename that is different from the packagename on disk; this is useful when loading multiple copies of the same package. Unique ID associated with this load request (the same package can be associated with multiple IDs).
Parameters
| Name | Description |
|---|---|
| InPackagePath | PackagePath to load. Must be a mounted path. The package is created if it does not already exist. |
| InPackageNameToCreate | If not none, this is the name of the package to load the bytes on disk into (and create if not yet existing). If none, the name is taken from PackagePath. |
| InCompletionDelegate | Delegate to be invoked when the packages has finished streaming |
| InPackageFlags | Package flags used to construct loaded package in memory |
| InPIEInstanceID | Play in Editor instance ID |
| InPackagePriority | Loading priority |
| InstancingContext | Additional context to map object names to their instanced counterpart when loading an instanced package |
| LoadFlags | Flags controlling loading behavior, from the ELoadFlags enum |