ReloadPackages

Given an array of packages, checks to see if each package has been loaded, and if so, unloads it before loading it again.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/PackageReload.h

Include

#include "UObject/PackageReload.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/UObject/PackageReload.cpp

Syntax

void ReloadPackages
(
    const TArrayView< FReloadPackageData > & InPackagesToReload,
    TArray< UPackage * > & OutReloadedPackages,
    const int32 InNumPackagesPerBatch
)

Remarks

Given an array of packages, checks to see if each package has been loaded, and if so, unloads it before loading it again. Does nothing if the package isn't currently loaded. @note This doesn't re-order the loads to make sure that dependencies are re-loaded first, you must handle that in your calling code (

Parameters

Parameter

Description

InPackagesToReload

Array of packages to reload.

OutReloadedPackages

Array of new package pointers. An entry will be present for every item from InPackagesToReload, however they may be null.

InNumPackagesPerBatch

The number of packages to process before running a pointer fix-up and GC. More packages per-batch will process faster, but consume more memory.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss