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

#include <AsyncPackageLoader.h>

+ Inheritance diagram for IAsyncPackageLoader:

Public Member Functions

virtual ~IAsyncPackageLoader ()
 
virtual void InitializeLoading ()=0
 
virtual void ShutdownLoading ()=0
 
virtual void StartThread ()=0
 
virtual bool ShouldAlwaysLoadPackageAsync (const FPackagePath &PackagePath)=0
 
virtual int32 LoadPackage (const FPackagePath &PackagePath, FName CustomPackageName, FLoadPackageAsyncDelegate InCompletionDelegate, EPackageFlags InPackageFlags, int32 InPIEInstanceID, int32 InPackagePriority, const FLinkerInstancingContext *InInstancingContext, uint32 InLoadFlags)=0
 
virtual int32 LoadPackage (const FPackagePath &PackagePath, FLoadPackageAsyncOptionalParams OptionalParams)
 
virtual EAsyncPackageState::Type ProcessLoading (bool bUseTimeLimit, bool bUseFullTimeLimit, double TimeLimit)=0
 
virtual EAsyncPackageState::Type ProcessLoadingUntilComplete (TFunctionRef< bool()> CompletionPredicate, double TimeLimit)=0
 
virtual void CancelLoading ()=0
 
virtual void SuspendLoading ()=0
 
virtual void ResumeLoading ()=0
 
virtual void FlushLoading (TConstArrayView< int32 > RequestIds)=0
 
virtual int32 GetNumQueuedPackages ()=0
 
virtual int32 GetNumAsyncPackages ()=0
 
virtual float GetAsyncLoadPercentage (const FName &PackageName)=0
 
virtual bool IsAsyncLoadingSuspended ()=0
 
virtual bool IsInAsyncLoadThread ()=0
 
virtual bool IsMultithreaded ()=0
 
virtual bool IsAsyncLoadingPackages ()=0
 
virtual void NotifyConstructedDuringAsyncLoading (UObject *Object, bool bSubObject)=0
 
virtual void NotifyUnreachableObjects (const TArrayView< FUObjectItem * > &UnreachableObjects)=0
 
virtual void NotifyRegistrationEvent (FName PackageName, FName Name, ENotifyRegistrationType NotifyRegistrationType, ENotifyRegistrationPhase NotifyRegistrationPhase, UObject *(*InRegister)(), bool InbDynamic, UObject *FinishedObject)=0
 
virtual void NotifyScriptVersePackage (Verse::VPackage *Package)
 Called for built in packages (currently only VVMIntrinsics.cpp) to allow them to be imported.
 
virtual void NotifyRegistrationComplete ()=0
 
virtual ELoaderType GetLoaderType () const =0
 

Static Protected Member Functions

static int32 GetNextRequestId ()
 

Detailed Description

Asynchronous package loader interface.

Constructor & Destructor Documentation

◆ ~IAsyncPackageLoader()

virtual IAsyncPackageLoader::~IAsyncPackageLoader ( )
inlinevirtual

Member Function Documentation

◆ CancelLoading()

virtual void IAsyncPackageLoader::CancelLoading ( )
pure virtual

Cancels streaming.

Note: Called from Game Thread.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ FlushLoading()

virtual void IAsyncPackageLoader::FlushLoading ( TConstArrayView< int32 RequestIds)
pure virtual

Flush pending loading request(s).

Note: Called from Game Thread.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ GetAsyncLoadPercentage()

virtual float IAsyncPackageLoader::GetAsyncLoadPercentage ( const FName PackageName)
pure virtual

[GAME THREAD] Gets the load percentage of the specified package

Parameters
PackageNameName of the package to return async load percentage for
Returns
Percentage (0-100) of the async package load or -1 of package has not been found

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ GetLoaderType()

virtual ELoaderType IAsyncPackageLoader::GetLoaderType ( ) const
pure virtual

◆ GetNextRequestId()

int32 IAsyncPackageLoader::GetNextRequestId ( )
staticprotected

◆ GetNumAsyncPackages()

virtual int32 IAsyncPackageLoader::GetNumAsyncPackages ( )
pure virtual

Returns the number of loading packages.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ GetNumQueuedPackages()

virtual int32 IAsyncPackageLoader::GetNumQueuedPackages ( )
pure virtual

Returns the number of queued packages.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ InitializeLoading()

virtual void IAsyncPackageLoader::InitializeLoading ( )
pure virtual

◆ IsAsyncLoadingPackages()

virtual bool IAsyncPackageLoader::IsAsyncLoadingPackages ( )
pure virtual

Returns whether packages are currently being loaded on a background thread. Note: GIsInitialLoad guards the package loader from creating background threads too early.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ IsAsyncLoadingSuspended()

virtual bool IAsyncPackageLoader::IsAsyncLoadingSuspended ( )
pure virtual

Returns whether the package loader is suspended or not.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ IsInAsyncLoadThread()

virtual bool IAsyncPackageLoader::IsInAsyncLoadThread ( )
pure virtual

Returns whether in package loader background thread or not.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ IsMultithreaded()

virtual bool IAsyncPackageLoader::IsMultithreaded ( )
pure virtual

Returns whether loading packages with multiple threads. Note: GIsInitialLoad guards the package loader from creating background threads too early.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ LoadPackage() [1/2]

virtual int32 IAsyncPackageLoader::LoadPackage ( const FPackagePath PackagePath,
FLoadPackageAsyncOptionalParams  OptionalParams 
)
inlinevirtual

Asynchronously load a package.

Parameters
PackagePathPackagePath to load. Must be a mounted path. The package is created if it does not already exist.
OptionalParamsStruct containing all the parameters required to load the package.
Returns
Unique ID associated with this load request (the same package can be associated with multiple IDs).

Reimplemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ LoadPackage() [2/2]

virtual int32 IAsyncPackageLoader::LoadPackage ( const FPackagePath PackagePath,
FName  CustomPackageName,
FLoadPackageAsyncDelegate  InCompletionDelegate,
EPackageFlags  InPackageFlags,
int32  InPIEInstanceID,
int32  InPackagePriority,
const FLinkerInstancingContext InInstancingContext,
uint32  InLoadFlags 
)
pure virtual

Asynchronously load a package.

Parameters
PackagePathPackagePath to load. Must be a mounted path. The package is created if it does not already exist.
CustomPackageNameIf not none, this is the name of the package to load into (and create if not yet existing). If none, the name is take from PackagePath.
InCompletionDelegateDelegate to be invoked when the packages has finished streaming
InPackageFlagsPackage flags used to construct loaded package in memory
InPIEInstanceIDPlay in Editor instance ID
InPackagePriorityLoading priority
InstancingContextAdditional context to map object names to their instanced counterpart when loading an instanced package
LoadFlagsFlags controlling loading behavior, from the ELoadFlags enum
Returns
Unique ID associated with this load request (the same package can be associated with multiple IDs).

Implemented in FAsyncLoadingThread, FAsyncLoadingThread2, and FTransactionallySafeAsyncPackageLoader.

◆ NotifyConstructedDuringAsyncLoading()

virtual void IAsyncPackageLoader::NotifyConstructedDuringAsyncLoading ( UObject Object,
bool  bSubObject 
)
pure virtual

◆ NotifyRegistrationComplete()

virtual void IAsyncPackageLoader::NotifyRegistrationComplete ( )
pure virtual

◆ NotifyRegistrationEvent()

virtual void IAsyncPackageLoader::NotifyRegistrationEvent ( FName  PackageName,
FName  Name,
ENotifyRegistrationType  NotifyRegistrationType,
ENotifyRegistrationPhase  NotifyRegistrationPhase,
UObject *(*)()  InRegister,
bool  InbDynamic,
UObject FinishedObject 
)
pure virtual

◆ NotifyScriptVersePackage()

virtual void IAsyncPackageLoader::NotifyScriptVersePackage ( Verse::VPackage *  Package)
inlinevirtual

Called for built in packages (currently only VVMIntrinsics.cpp) to allow them to be imported.

Reimplemented in FAsyncLoadingThread2, and FTransactionallySafeAsyncPackageLoader.

◆ NotifyUnreachableObjects()

virtual void IAsyncPackageLoader::NotifyUnreachableObjects ( const TArrayView< FUObjectItem * > &  UnreachableObjects)
pure virtual

◆ ProcessLoading()

virtual EAsyncPackageState::Type IAsyncPackageLoader::ProcessLoading ( bool  bUseTimeLimit,
bool  bUseFullTimeLimit,
double  TimeLimit 
)
pure virtual

Process all currently loading package requests.

Parameters
bUseTimeLimitWhether to use time limit or not
bUseFullTimeLimit
TimeLimitTime limit

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ ProcessLoadingUntilComplete()

virtual EAsyncPackageState::Type IAsyncPackageLoader::ProcessLoadingUntilComplete ( TFunctionRef< bool()>  CompletionPredicate,
double  TimeLimit 
)
pure virtual

Process all loading package requests until completion predicate is satisfied.

Parameters
CompletionPredicateCompletion predicate
TimeLimitTime limit

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ ResumeLoading()

virtual void IAsyncPackageLoader::ResumeLoading ( )
pure virtual

Resumes async loading thread

Note: Called from Game Thread.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.

◆ ShouldAlwaysLoadPackageAsync()

virtual bool IAsyncPackageLoader::ShouldAlwaysLoadPackageAsync ( const FPackagePath PackagePath)
pure virtual

◆ ShutdownLoading()

virtual void IAsyncPackageLoader::ShutdownLoading ( )
pure virtual

◆ StartThread()

virtual void IAsyncPackageLoader::StartThread ( )
pure virtual

◆ SuspendLoading()

virtual void IAsyncPackageLoader::SuspendLoading ( )
pure virtual

Suspends async loading thread

Note: Called from Game Thread.

Implemented in FAsyncLoadingThread2, FAsyncLoadingThread, and FTransactionallySafeAsyncPackageLoader.


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