UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Linker.cpp File Reference

Namespaces

namespace  Linker
 

Macros

#define LOCTEXT_NAMESPACE   "Linker"
 

Functions

 DEFINE_LOG_CATEGORY (LogLinker)
 
FORCEINLINE bool Linker::IsCorePackage (const FName &PackageName)
 
uint32 GetTypeHash (const FDependencyRef &Ref)
 
FArchiveoperator<< (FArchive &Ar, FCompressedChunk &Chunk)
 
void operator<< (FStructuredArchive::FSlot Slot, FCompressedChunk &Chunk)
 
FString GetPrestreamPackageLinkerName (const TCHAR *InLongPackageName, bool bSkipIfExists)
 
FLinkerLoadGetPackageLinker (UPackage *InOuter, const FPackagePath &InPackagePath, uint32 LoadFlags, UPackageMap *Sandbox, FArchive *InReaderOverride, FUObjectSerializeContext **InOutLoadContext, FLinkerLoad *ImportLinker, const FLinkerInstancingContext *InstancingContext)
 
FLinkerLoadLoadPackageLinker (UPackage *InOuter, const FPackagePath &PackagePath, uint32 LoadFlags, UPackageMap *Sandbox, FArchive *InReaderOverride, TFunctionRef< void(FLinkerLoad *LoadedLinker)> LinkerLoadedCallback)
 
FLinkerLoadLoadPackageLinker (UPackage *InOuter, const FPackagePath &PackagePath, uint32 LoadFlags, UPackageMap *Sandbox, FArchive *InReaderOverride)
 
void ResetLinkerExports (UPackage *InPackage)
 
void ConditionalFlushAsyncLoadingForLinkers (TConstArrayView< FLinkerLoad * > InLinkers)
 
void ResetLoaders (UObject *InPkg)
 
void ResetLoaders (TConstArrayView< UObject * > InOuters)
 
void ConditionalFlushAsyncLoadingForSave (UPackage *InPackage)
 
void ResetLoadersForSave (UPackage *Package, const TCHAR *Filename)
 
void ResetLoadersForSave (TConstArrayView< FPackageSaveInfo > InPackages)
 
void DeleteLoaders ()
 
void DeleteLoader (FLinkerLoad *Loader)
 
void EnsureLoadingComplete (UPackage *Package)
 

Macro Definition Documentation

◆ LOCTEXT_NAMESPACE

#define LOCTEXT_NAMESPACE   "Linker"

Function Documentation

◆ ConditionalFlushAsyncLoadingForLinkers()

void ConditionalFlushAsyncLoadingForLinkers ( TConstArrayView< FLinkerLoad * >  InLinkers)

◆ ConditionalFlushAsyncLoadingForSave()

void ConditionalFlushAsyncLoadingForSave ( UPackage InPackage)

Conditionally flush async loading for a specific package if there's any pending async requests

Parameters
InPackageThe package to flush for

◆ DEFINE_LOG_CATEGORY()

DEFINE_LOG_CATEGORY ( LogLinker  )

◆ DeleteLoader()

void DeleteLoader ( FLinkerLoad Loader)

Queues linker for deletion

◆ DeleteLoaders()

void DeleteLoaders ( )

Deletes all linkers that have finished loading

◆ EnsureLoadingComplete()

void EnsureLoadingComplete ( UPackage Package)

◆ GetPackageLinker()

FLinkerLoad * GetPackageLinker ( UPackage InOuter,
const FPackagePath PackagePath,
uint32  LoadFlags,
UPackageMap Sandbox,
FArchive InReaderOverride = nullptr,
FUObjectSerializeContext **  InOutLoadContext = nullptr,
FLinkerLoad ImportLinker = nullptr,
const FLinkerInstancingContext InstancingContext = nullptr 
)

Gets a linker for a package and returns it without loading any objects.

Parameters
InOuterPackage if known, can be null
PackagePathPackage resource to load, must not be empty
LoadFlagsFlags to pass to the new linker
SandboxAdditional sandbox for loading
CompatibleGuidNet GUID
InReaderOverrideOptional archive to use for reading package data
InOutLoadContextOptional load context. If the package linker is already associated with a context that's currently loading objects that context will be returned in this param
ImportLinkerOptional import linker that triggered the linker creation. it will pass in its instancing context if a linker is created, take precedence over the optional InstancingContext
InstancingContextOptional instancing context to pass in if a linker is created
Returns
Pointer to the loaded linker or null if the file didn't exist

◆ GetPrestreamPackageLinkerName()

FString GetPrestreamPackageLinkerName ( const TCHAR InLongPackageName,
bool  bSkipIfExists 
)

◆ GetTypeHash()

uint32 GetTypeHash ( const FDependencyRef Ref)

Type hash implementation.

Parameters
RefReference to hash
Returns
hash value

◆ LoadPackageLinker() [1/2]

FLinkerLoad * LoadPackageLinker ( UPackage InOuter,
const FPackagePath PackagePath,
uint32  LoadFlags,
UPackageMap Sandbox,
FArchive InReaderOverride 
)

◆ LoadPackageLinker() [2/2]

FLinkerLoad * LoadPackageLinker ( UPackage InOuter,
const FPackagePath PackagePath,
uint32  LoadFlags,
UPackageMap Sandbox,
FArchive InReaderOverride,
TFunctionRef< void(FLinkerLoad *LoadedLinker)>  LinkerLoadedCallback 
)

Loads a linker for a package and returns it without loading any objects.

Parameters
InOuterPackage if known, can be null
PackagePathPackage resource to load, must not be empty
LoadFlagsFlags to pass to the new linker
SandboxAdditional sandbox for loading
CompatibleGuidNet GUID
InReaderOverrideOptional archive to use for reading package data
LinkerLoadedCallbackCallback when the linker is loaded (or not found)
Returns
Pointer to the loaded linker or null if the file didn't exist

◆ operator<<() [1/2]

FArchive & operator<< ( FArchive Ar,
FCompressedChunk Chunk 
)

I/O function

◆ operator<<() [2/2]

void operator<< ( FStructuredArchive::FSlot  Slot,
FCompressedChunk Chunk 
)

◆ ResetLinkerExports()

void ResetLinkerExports ( UPackage InPackage)

Reset the linker exports associated with the package

Note
, this might flush async loading if the linker is owned by the loading thread

◆ ResetLoaders() [1/2]

void ResetLoaders ( TConstArrayView< UObject * >  InOuters)

◆ ResetLoaders() [2/2]

void ResetLoaders ( UObject InOuter)

Remove references to the linker for the given package and delete the linker. Can be called after the package has finished loading. Flushes async loading.

◆ ResetLoadersForSave() [1/2]

void ResetLoadersForSave ( TConstArrayView< FPackageSaveInfo InPackages)

Reset the loaders for the given packages if they are using the given filenames, so we can write to the files

Parameters
InPackageThe package we are saving along with their filename

◆ ResetLoadersForSave() [2/2]

void ResetLoadersForSave ( UPackage Package,
const TCHAR Filename 
)

Reset the loader for the given package if it is using the given filename, so we can write to the file

Parameters
PackageThe package we are saving
FilenameThe filename we are saving too