UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTransactionallySafeAsyncPackageLoader Class Referencefinal
+ Inheritance diagram for FTransactionallySafeAsyncPackageLoader:

Public Member Functions

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

Additional Inherited Members

- Static Protected Member Functions inherited from IAsyncPackageLoader
static int32 GetNextRequestId ()
 

Constructor & Destructor Documentation

◆ FTransactionallySafeAsyncPackageLoader()

FTransactionallySafeAsyncPackageLoader::FTransactionallySafeAsyncPackageLoader ( IAsyncPackageLoader *const  InWrappedPackageLoader)
inline

◆ ~FTransactionallySafeAsyncPackageLoader()

virtual FTransactionallySafeAsyncPackageLoader::~FTransactionallySafeAsyncPackageLoader ( )
inlinevirtual

Member Function Documentation

◆ CancelLoading()

void FTransactionallySafeAsyncPackageLoader::CancelLoading ( )
inlineoverridevirtual

Cancels streaming.

Note: Called from Game Thread.

Implements IAsyncPackageLoader.

◆ FlushLoading()

void FTransactionallySafeAsyncPackageLoader::FlushLoading ( TConstArrayView< int32 RequestIds)
inlineoverridevirtual

Flush pending loading request(s).

Note: Called from Game Thread.

Implements IAsyncPackageLoader.

◆ GetAsyncLoadPercentage()

float FTransactionallySafeAsyncPackageLoader::GetAsyncLoadPercentage ( const FName PackageName)
inlineoverridevirtual

[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

Implements IAsyncPackageLoader.

◆ GetLoaderType()

ELoaderType FTransactionallySafeAsyncPackageLoader::GetLoaderType ( ) const
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ GetNumAsyncPackages()

int32 FTransactionallySafeAsyncPackageLoader::GetNumAsyncPackages ( )
inlineoverridevirtual

Returns the number of loading packages.

Implements IAsyncPackageLoader.

◆ GetNumQueuedPackages()

int32 FTransactionallySafeAsyncPackageLoader::GetNumQueuedPackages ( )
inlineoverridevirtual

Returns the number of queued packages.

Implements IAsyncPackageLoader.

◆ InitializeLoading()

void FTransactionallySafeAsyncPackageLoader::InitializeLoading ( )
inlineoverridevirtual

Initialize loading.

Implements IAsyncPackageLoader.

◆ IsAsyncLoadingPackages()

bool FTransactionallySafeAsyncPackageLoader::IsAsyncLoadingPackages ( )
inlineoverridevirtual

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

Implements IAsyncPackageLoader.

◆ IsAsyncLoadingSuspended()

bool FTransactionallySafeAsyncPackageLoader::IsAsyncLoadingSuspended ( )
inlineoverridevirtual

Returns whether the package loader is suspended or not.

Implements IAsyncPackageLoader.

◆ IsInAsyncLoadThread()

bool FTransactionallySafeAsyncPackageLoader::IsInAsyncLoadThread ( )
inlineoverridevirtual

Returns whether in package loader background thread or not.

Implements IAsyncPackageLoader.

◆ IsMultithreaded()

bool FTransactionallySafeAsyncPackageLoader::IsMultithreaded ( )
inlineoverridevirtual

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

Implements IAsyncPackageLoader.

◆ LoadPackage() [1/2]

int32 FTransactionallySafeAsyncPackageLoader::LoadPackage ( const FPackagePath PackagePath,
FLoadPackageAsyncOptionalParams  OptionalParams 
)
inlineoverridevirtual

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 from IAsyncPackageLoader.

◆ LoadPackage() [2/2]

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

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).

Implements IAsyncPackageLoader.

◆ NotifyConstructedDuringAsyncLoading()

void FTransactionallySafeAsyncPackageLoader::NotifyConstructedDuringAsyncLoading ( UObject Object,
bool  bSubObject 
)
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ NotifyRegistrationComplete()

void FTransactionallySafeAsyncPackageLoader::NotifyRegistrationComplete ( )
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ NotifyRegistrationEvent()

void FTransactionallySafeAsyncPackageLoader::NotifyRegistrationEvent ( FName  PackageName,
FName  Name,
ENotifyRegistrationType  NotifyRegistrationType,
ENotifyRegistrationPhase  NotifyRegistrationPhase,
UObject *(*)()  InRegister,
bool  InbDynamic,
UObject FinishedObject 
)
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ NotifyScriptVersePackage()

void FTransactionallySafeAsyncPackageLoader::NotifyScriptVersePackage ( Verse::VPackage *  Package)
inlineoverridevirtual

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

Reimplemented from IAsyncPackageLoader.

◆ NotifyUnreachableObjects()

void FTransactionallySafeAsyncPackageLoader::NotifyUnreachableObjects ( const TArrayView< FUObjectItem * > &  UnreachableObjects)
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ ProcessLoading()

EAsyncPackageState::Type FTransactionallySafeAsyncPackageLoader::ProcessLoading ( bool  bUseTimeLimit,
bool  bUseFullTimeLimit,
double  TimeLimit 
)
inlineoverridevirtual

Process all currently loading package requests.

Parameters
bUseTimeLimitWhether to use time limit or not
bUseFullTimeLimit
TimeLimitTime limit

Implements IAsyncPackageLoader.

◆ ProcessLoadingUntilComplete()

EAsyncPackageState::Type FTransactionallySafeAsyncPackageLoader::ProcessLoadingUntilComplete ( TFunctionRef< bool()>  CompletionPredicate,
double  TimeLimit 
)
inlineoverridevirtual

Process all loading package requests until completion predicate is satisfied.

Parameters
CompletionPredicateCompletion predicate
TimeLimitTime limit

Implements IAsyncPackageLoader.

◆ ResumeLoading()

void FTransactionallySafeAsyncPackageLoader::ResumeLoading ( )
inlineoverridevirtual

Resumes async loading thread

Note: Called from Game Thread.

Implements IAsyncPackageLoader.

◆ ShouldAlwaysLoadPackageAsync()

bool FTransactionallySafeAsyncPackageLoader::ShouldAlwaysLoadPackageAsync ( const FPackagePath PackagePath)
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ ShutdownLoading()

void FTransactionallySafeAsyncPackageLoader::ShutdownLoading ( )
inlineoverridevirtual

Shut down loading.

Implements IAsyncPackageLoader.

◆ StartThread()

void FTransactionallySafeAsyncPackageLoader::StartThread ( )
inlineoverridevirtual

Implements IAsyncPackageLoader.

◆ SuspendLoading()

void FTransactionallySafeAsyncPackageLoader::SuspendLoading ( )
inlineoverridevirtual

Suspends async loading thread

Note: Called from Game Thread.

Implements IAsyncPackageLoader.


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