Language:
Discover
By Skill Level
By Category

UPackage

Choose your OS:

Inheritance Hierarchy

Syntax

class UPackage : public UObject

Remarks

A package.

Variables

Name Description

Public variable

uint8 : 1

 

bHasBeenFullyLoaded

Whether this package has been fully loaded (aka had all it's exports created) at some point.

Public variable

uint8 : 1

 

bIsCookedForEditor

True if this packages has been cooked for the editor / opened cooked by the editor

Public variable

FName

 

FileName

The name of the file that this package was loaded from

Public variable

uint64

 

FileSize

Size of the file for this package; if the package was not loaded from a file or was a forced export in another package, this will be zero

Public variable

FCustomVersionC ...

 

LinkerCustomVersion

Linker custom version container this package has been serialized with.

Public variable

int32

 

LinkerLicenseeVersion

Linker licensee version this package has been serialized with. This is mostly used by PostLoad

Public variable

FLinkerLoad ...

 

LinkerLoad

Linker load associated with this package

Public variable

int32

 

LinkerPackageVersion

Linker package version this package has been serialized with. This is mostly used by PostLoad

Public variable

UMetaData *

 

MetaData

MetaData for the editor, or NULL in the game.

Public variable

int32

 

PIEInstanceID

Editor only: PIE instance ID this package belongs to, INDEX_NONE otherwise

Public variable

TUniquePtr < FTh ...

 

ThumbnailMap

Editor only: Thumbnails stored in this package

Public variable

TUniquePtr < FWo ...

 

WorldTileInfo

World browser information.

Constructors

Name Description

Public function

UPackage

(
    FVTableHelper & Helper
)

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Public function

UPackage

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Static

void

 

__DefaultConstructor

(
    const FObjectInitializer & X
)

Public function Static

UObject *...

 

__VTableCtorCaller

(
    FVTableHelper & Helper
)

Public function

FThumbnailMa ...

 

AccessThumbnailMap()

Access the thumbnail map for this package. Only call this if HasThumbnailMap returns true!

Public function Static

void

 

AddReferencedObjects

(
    UObject * InThis,
    FReferenceCollector & Collector
)

Public function

void

 

ClearPackageFlags

(
    uint32 NewFlags
)

Set the specified flags to false. Does not affect any other flags.

Public function

bool

 

ContainsMap()

Returns whether this package contains a ULevel or UWorld object.

Public function

void

 

FullyLoad()

Fully loads this package. Safe to call multiple times and won't clobber already loaded assets.

Public function

const TArray ...

 

GetChunkIDs()

Returns our ChunkIDs

Public function Static

EObjectMark

 

GetExcludedObjectMarksForTargetPlatform

(
    const ITargetPlatform * TargetP...,
    const bool bIsCooking
)

Determines the set of object marks that should be excluded for the target platform

Public function

int64

 

GetFileSize()

Returns our FileSize

Public function

FName

 

GetFolderName()

Get the package's folder name

Folder name

Public function

FGuid

 

GetGuid()

Returns our Guid

Public function

float

 

GetLoadTime()

Returns the time it took the last time this package was fully loaded, 0 otherwise.

Public function

UMetaData &#...

 

GetMetaData()

MetaData.

Public function

uint32

 

GetPackageFlags()

Gets the package flags.

The package flags.

Public function

const FThumb ...

 

GetThumbnailMap()

Returns the thumbnail map for this package (const).

Public function

bool

 

HasAllPackagesFlags

(
    uint32 FlagsToCheck
)

Used to safely check whether all of the passed in flags are set.

Public function

bool

 

HasAnyPackageFlags

(
    uint32 FlagsToCheck
)

Used to safely check whether the passed in flag is set.

Public function

bool

 

HasThumbnailMap()

Returns true if this package has a thumbnail map

Public function

bool

 

IsDirty()

Returns whether the package needs to be saved.

Public function Static

bool

 

IsEmptyPackage

(
    UPackage * Package,
    const UObject * LastReferencer
)

Determines if a package contains no more assets.

true if Package contains no more assets.

Public function

bool

 

IsFullyLoaded()

Returns whether the package is fully loaded.

Public function

bool

 

IsLoadedByEditorPropertiesOnly()

Returns true when the package is only referenced by editor-only flag

Public function

void

 

MakeNewGuid()

Makes our a new fresh Guid

Public function

void

 

MarkAsFullyLoaded()

Marks this package as being fully loaded.

Public function

bool

 

RequiresLocalizationGather()

Returns whether this package contains data required to be gathered for localization.

Public function Static

FSavePackage ...

 

Save

(
    UPackage * InOuter,
    UObject * Base,
    EObjectFlags TopLevelFlags,
    const TCHAR * Filename,
    FOutputDevice * Error,
    FLinkerLoad * Conform,
    bool bForceByteSwapping,
    bool bWarnOfLongFilename,
    uint32 SaveFlags,
    const ITargetPlatform * TargetP...,
    const FDateTime & FinalTimeStamp,
    bool bSlowTask,
    FArchiveDiffMap * InOutDiffMap
)

Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package.

Public function Static

void

 

SaveAssetRegistryData

(
    UPackage * InOuter,
    FLinkerSave * Linker,
    FStructuredArchive::FSlot Slot
)

Static: Saves asset registry data for the specified package outer and linker

Public function Static

bool

 

SavePackage

(
    UPackage * InOuter,
    UObject * Base,
    EObjectFlags TopLevelFlags,
    const TCHAR * Filename,
    FOutputDevice * Error,
    FLinkerLoad * Conform,
    bool bForceByteSwapping,
    bool bWarnOfLongFilename,
    uint32 SaveFlags,
    const ITargetPlatform * TargetP...,
    const FDateTime & FinalTimeStamp,
    bool bSlowTask
)

Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package.

Public function Static

void

 

SaveThumbnails

(
    UPackage * InOuter,
    FLinkerSave * Linker,
    FStructuredArchive::FSlot Slot
)

Static: Saves thumbnail data for the specified package outer and linker

Public function Static

void

 

SaveWorldLevelInfo

(
    UPackage * InOuter,
    FLinkerSave * Linker,
    FStructuredArchive::FSlot Slot
)

Static: Saves the level information used by the World browser

Public function

void

 

SetChunkIDs

(
    const TArray < int32 >& InChunkIDs
)

Sets our ChunkIDs

Public function

void

 

SetDirtyFlag

(
    bool bIsDirty
)

Marks/Unmarks the package's bDirty flag

Public function

void

 

SetFolderName

(
    FName name
)

Set the package's folder name

Public function

void

 

SetGuid

(
    FGuid NewGuid
)

Sets a specific Guid

Public function

void

 

SetLoadedByEditorPropertiesOnly

(
    bool bIsEditorOnly,
    bool bRecursive
)

Sets the bLoadedByEditorPropertiesOnly flag

Public function

void

 

SetLoadTime

(
    float InLoadTime
)

UPackage interface.

Public function

void

 

SetPackageFlags

(
    uint32 NewFlags
)

Set the specified flags to true. Does not affect any other flags.

Public function

void

 

SetPackageFlagsTo

(
    uint32 NewFlags
)

Public function Static

UClass *

 

StaticClass()

Returns a UClass object representing this class at runtime

Public function Static

EClassCastFl ...

 

StaticClassCastFlags()

Returns the static cast flags for this class

Public function Static

const TCHAR ...

 

StaticPackage()

Returns the package this class belongs in

Public function Static

void

 

StaticRegisterNativesUPackage()

Public function

void

 

ThisContainsMap()

Called to indicate that this package contains a ULevel or UWorld object.

Public function

void

 

ThisRequiresLocalizationGather

(
    bool Value
)

Called to indicate that this package contains data required to be gathered for localization.

Public function Static

void

 

WaitForAsyncFileWrites()

Wait for any SAVE_Async file writes to complete

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

bool

 

IsAsset()

Packages are never assets

Public function Virtual

bool

 

IsNameStableForNetworking()

WITH_EDITOR.

Public function Virtual

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

bool

 

NeedsLoadForClient()

For now, assume all packages have stable net names.

Public function Virtual

bool

 

NeedsLoadForServer()

To avoid calling the expensive generic version, which only makes sure that the UPackage static class isn't excluded.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, but before the config has been loaded, etc.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

Serializer

Public function Virtual

void

 

TagSubobjects

(
    EObjectFlags NewFlags
)

Tags the Package's metadata

Tags generated objects with flags

Operators

Name Description

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal InInternalOnly,
    UObject * InOuter,
    FName InName,
    EObjectFlags InSetFlags
)

For internal use only; use StaticConstructObject() to create new objects.

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal * InMem
)

For internal use only; use StaticConstructObject() to create new objects.

Typedefs

Name

Description

FOnPackageDirtyStateChanged

Delegate type for package dirty state events. ( Params: UPackage* ModifiedPackage )

FOnPackageMarkedDirty

Delegate type for when a package is marked as dirty via UObjectBaseUtilty::MarkPackageDirty ( Params: UPackage* ModifiedPackage, bool bWasDirty )

FOnPackageSaved

Delegate type for package saved events ( Params: const FString & PackageFileName, UObject* Outer )

FPreSavePackage

Delegate type for when a package is about to be saved

Super

Typedef for the base class (UObject )

ThisClass

Typedef for UPackage .

Constants

Name

Description

EditorPackage

UE-21181 - trying to track when a flag gets set on a package due to PIE.

PackageDirtyStateChangedEvent

Delegate to notify subscribers when the dirty state of a package is changed.

PackageMarkedDirtyEvent

Delegate to notify subscribers when a package is marked as dirty via UObjectBaseUtilty::MarkPackageDirty Note: Unlike FOnPackageDirtyStateChanged, this is always called, even when the package is already dirty Use bWasDirty to check the previous dirty state of the package Use Package->IsDirty() to get the updated dirty state of the package

PackageSavedEvent

Delegate to notify subscribers when a package has been saved.

PreSavePackageEvent

Delegate to notify subscribers when a package is about to be saved.

StaticClassFlags

Bitwise union of EClassFlags pertaining to this class.

References

Module

CoreUObject

Header

Runtime/CoreUObject/Public/UObject/Package.h