LoadPackage

Loads a package and all contained objects that match context flags.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Source

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

Syntax

UPackage * LoadPackage
(
    UPackage * InOuter,
    const TCHAR * InLongPackageName,
    uint32 LoadFlags,
    FArchive * InReaderOverride,
    const FLinkerInstancingContext * InstancingContext
)

Remarks

Loads a package and all contained objects that match context flags.

Returns

Loaded package if successful, nullptr otherwise

Parameters

Parameter

Description

InOuter

Package to load new package into (usually nullptr or ULevel->GetOuter())

InLongPackageName

Long package name to load

LoadFlags

Flags controlling loading behavior, from the ELoadFlags enum

InReaderOverride

Optional archive to use for reading package data

InLoadContext

Additional context when called during serialization

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