Navigation
Unreal Engine C++ API Reference > Runtime > CoreUObject > UObject
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UPackage
References
Module | CoreUObject |
Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/Package.h |
Include | #include "UObject/Package.h" |
Syntax
class UPackage : public UObject
Remarks
A package.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
uint8: 1 | bCanBeImported | Whether this package can be imported, i.e. its package name is a package that exists on disk. |
![]() |
uint8: 1 | bHasBeenFullyLoaded | Whether this package has been fully loaded (aka had all it's exports created) at some point. |
![]() |
uint8: 1 | bIsCookedForEditor | True if this packages has been cooked for the editor / opened cooked by the editor |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UPackage
(
FVTableHelper& Helper |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes. | |
![]() |
UPackage
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | __DefaultConstructor
(
const FObjectInitializer& X |
|
![]() ![]() |
UObject * | __VTableCtorCaller
(
FVTableHelper& Helper |
|
![]() |
FThumbnailMap & | Access the thumbnail map for this package. Only call this if HasThumbnailMap returns true! | |
![]() ![]() |
void | AddReferencedObjects
(
UObject* InThis, |
Static class override of UObject::AddReferencedObjects |
![]() ![]() |
bool | Returns whether the package can be imported. | |
![]() |
void | Clear the package dirty flag without any transaction tracking | |
![]() |
void | ClearPackageFlags
(
uint32 NewFlags |
Set the specified flags to false. Does not affect any other flags. |
![]() ![]() |
bool | ContainsMap () |
Returns whether this package contains a ULevel or UWorld object. |
![]() ![]() |
UObject * | FindAssetInPackage
(
EObjectFlags RequiredTopLevelFlags |
Utility function to find Asset in this package, if any |
![]() |
void | FullyLoad () |
Fully loads this package. Safe to call multiple times and won't clobber already loaded assets. |
![]() ![]() |
const TArray< int32 > & | GetChunkIDs () |
Returns our ChunkIDs |
![]() ![]() |
TArray< UPackage * > | Return the list of packages found assigned to object outer-ed to the top level objects of this package | |
![]() ![]() |
int64 | GetFileSize () |
Returns our FileSize |
![]() ![]() |
bool | ||
![]() ![]() |
FLinkerLoad * | GetLinker () |
|
![]() ![]() |
const FCustomVersionContainer & | ||
![]() ![]() |
int32 | ||
![]() ![]() |
const FPackageFileVersion & | ||
![]() ![]() |
const FPackagePath & | Get the path this package was loaded from; may be different than packagename, and may not be set if the package was not loaded from disk | |
![]() ![]() |
float | GetLoadTime () |
Returns the time it took the last time this package was fully loaded, 0 otherwise. |
![]() |
UMetaData * | GetMetaData () |
Gets (after possibly creating) a metadata object for this package |
![]() ![]() |
uint32 | Gets the package flags. | |
![]() ![]() |
FPackageId | GetPackageId () |
Returns the unique package id |
![]() ![]() |
FPackageId | Returns the unique package id to load | |
![]() ![]() |
FGuid | Returns our persistent Guid | |
![]() ![]() |
int32 | Returns the PIE instance id used by the package if any, or INDEX_NONE otherwise | |
![]() ![]() |
const TArray< UFunction * > & | ||
![]() ![]() |
const FThumbnailMap & | Returns the thumbnail map for this package (const). | |
![]() ![]() |
FWorldTileInfo * | Get the world tile info if any | |
![]() ![]() |
bool | HasAllPackagesFlags
(
uint32 FlagsToCheck |
Used to safely check whether all of the passed in flags are set. |
![]() ![]() |
bool | HasAnyPackageFlags
(
uint32 FlagsToCheck |
Used to safely check whether the passed in flag is set. |
![]() ![]() |
bool | Return true if SAVE_Async file writes are pending | |
![]() ![]() |
bool | HasMetaData () |
Return if the package currently has an assigned metadata object |
![]() ![]() |
bool | Returns true if this package has a thumbnail map | |
![]() ![]() |
bool | IsDirty () |
Returns whether the package needs to be saved. |
![]() ![]() |
bool | Returns the bIsDynamicPIEPackagePending flag | |
![]() ![]() |
bool | IsEmptyPackage
(
UPackage* Package, |
Determines if a package contains no more assets. |
![]() ![]() |
bool | ||
![]() ![]() |
bool | Returns whether the package is fully loaded. | |
![]() ![]() |
bool | Returns true when the package is only referenced by editor-only flag | |
![]() |
void | Marks this package as being fully loaded. | |
![]() |
void | Marks this package as newly created (has no corresponding file on disk). | |
![]() |
void | Marks this package as unloaded. | |
![]() ![]() |
bool | Returns whether this package contains data required to be gathered for localization. | |
![]() ![]() |
FSavePackageResultStruct | Save
(
UPackage* InOuter, |
Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package. |
![]() ![]() |
ESavePackageResult | SaveConcurrent
(
TArrayView< FPackageSaveInfo > InPackages, |
Save a list of packages concurrently using Save2 mechanism SaveConcurrent is currently experimental and shouldn't be used until it can safely replace Save. |
![]() ![]() |
bool | SavePackage
(
UPackage* InOuter, |
Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package. |
![]() |
void | SetCanBeImportedFlag
(
bool bInCanBeImported |
Marks/Unmarks the package's bCanBeImported flag. |
![]() |
void | SetChunkIDs
(
const TArray< int32 >& InChunkIDs |
Sets our ChunkIDs |
![]() |
void | SetDirtyFlag
(
bool bIsDirty |
Marks/Unmarks the package's bDirty flag, save the package to the transaction buffer if a transaction is ongoing |
![]() |
void | SetDynamicPIEPackagePending
(
bool bInIsDynamicPIEPackagePending |
Sets the bIsDynamicPIEPackagePending flag |
![]() |
void | SetHasBeenEndLoaded
(
bool bValue |
|
![]() |
void | SetIsExternallyReferenceable
(
bool bValue |
Sets whether or not the package is ExternallyReferenceable |
![]() |
void | SetLoadedByEditorPropertiesOnly
(
bool bIsEditorOnly, |
Sets the bLoadedByEditorPropertiesOnly flag |
![]() |
void | SetLoadedPath
(
const FPackagePath& PackagePath |
Set the path this package was loaded from; typically called only by the linker during load |
![]() |
void | SetLoadTime
(
float InLoadTime |
Sets the time it took to load this package. |
![]() |
void | SetPackageFlags
(
uint32 NewFlags |
Set the specified flags to true. Does not affect any other flags. |
![]() |
void | SetPackageFlagsTo
(
uint32 NewFlags |
|
![]() |
void | SetPackageId
(
FPackageId InPackageId |
Sets the unique package id |
![]() |
void | SetPersistentGuid
(
FGuid NewPersistentGuid |
Sets a specific persistent Guid |
![]() |
void | SetPIEInstanceID
(
int32 InPIEInstanceID |
Set the PIE instance id for this package |
![]() |
void | SetReloadDelegates
(
TArray< UFunction* > InDelegates |
|
![]() |
void | SetThumbnailMap
(
TUniquePtr< FThumbnailMap > InThumbnailMap |
Set the internal thumbnail map for this package. |
![]() |
void | SetWorldTileInfo
(
TUniquePtr< FWorldTileInfo > InWorldTileInfo |
Set the world tile info |
![]() ![]() |
UClass * | StaticClass () |
Returns a UClass object representing this class at runtime |
![]() ![]() |
EClassCastFlags | Returns the static cast flags for this class | |
![]() ![]() |
const TCHAR * | Returns the package this class belongs in | |
![]() ![]() |
void | ||
![]() |
void | Called to indicate that this package contains a ULevel or UWorld object. | |
![]() |
void | ThisRequiresLocalizationGather
(
bool Value |
Called to indicate that this package contains data required to be gathered for localization. |
![]() ![]() |
void | Wait for any SAVE_Async file writes to complete |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Called to finish destroying the object. | |
![]() ![]() ![]() |
bool | IsAsset () |
Packages are never assets |
![]() ![]() ![]() |
bool | Called during garbage collection to determine if an object can have its destructor called on a worker thread. | |
![]() ![]() ![]() |
bool | IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network | |
![]() ![]() ![]() |
bool | Called during async load to determine if PostLoad can be called on the loading thread. | |
![]() ![]() ![]() |
bool | Called during saving to determine the load flags to save with the object. | |
![]() ![]() ![]() |
bool | Called during saving to determine the load flags to save with the object. | |
![]() ![]() |
void | Called after the C++ constructor and after the properties have been initialized, but before the config has been loaded, etc. | |
![]() ![]() |
void | Serializer | |
![]() ![]() |
void | TagSubobjects
(
EObjectFlags NewFlags |
Tags the Package's metadataTags generated objects with flags |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
void | operator delete
(
void* InMem |
Eliminate V1062 warning from PVS-Studio while keeping MSVC and Clang happy. |
![]() |
void * | operator new
(
const size_t InSize, |
For internal use only; use StaticConstructObject() to create new objects. |
![]() |
void * | operator new
(
const size_t InSize, |
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 ) |
FOnPackageSavedWithContext | Delegate type for package saved events ( Params: const FString& PackageFileName, UObject* Outer, FObjectPostSaveContext ObjectSaveContext ) |
FPreSavePackage | Delegate type for when a package is about to be saved |
FPreSavePackageWithContext | 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 |
---|---|
bSupportCookerSoftGC | Functionality to support SoftGC in the cooker. |
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 | |
PackageSavedWithContextEvent | Delegate to notify subscribers when a package has been saved. |
PreSavePackageEvent | |
PreSavePackageWithContextEvent | Delegate to notify subscribers when a package is about to be saved. |
SoftGCPackageToObjectList | |
StaticClassFlags | Bitwise union of EClassFlags pertaining to this class. |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< UFunction * > | Delegates | Use Get/SetReloadDelegates instead |
![]() |
FName | FileName | Use GetLoadedPath instead |
![]() |
uint64 | FileSize | Use Get/SetFileSize instead |
![]() |
FCustomVersionContainer | LinkerCustomVersion | Use Get/SetLinkerCustomVersions instead |
![]() |
int32 | LinkerLicenseeVersion | Use Get/SetLinkerLicenseeVersion instead |
![]() |
FLinkerLoad * | LinkerLoad | Use Get/SetLinker instead |
![]() |
FPackageFileVersion | LinkerPackageVersion | Use Get/SetLinkerPackageVersion instead |
![]() |
UMetaData * | MetaData | Use Get/HasMetaData instead |
![]() |
int32 | PIEInstanceID | Use Get/SetPIEInstanceID instead |
![]() |
TUniquePtr< FThumbnailMap > | ThumbnailMap | Use Get/SetThumbnailMap instead |
![]() |
TUniquePtr< FWorldTileInfo > | WorldTileInfo | Use Get/SetWorldTileInfo instead |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FName | Unused property to be removed. Use something like FPackageName::GetLongPackagePath if requiring something similar. | |
![]() ![]() |
FGuid | GetGuid () |
UPackage::Guid has not been used by the engine for a long time and GetGuid will be removed. |
![]() |
FGuid | MakeNewGuid () |
UPackage::Guid has not been used by the engine for a long time and MakeNewGuid will be removed. |
![]() ![]() |
bool | SavePackage
(
UPackage* InOuter, |
Pack the arguments into FSavePackageArgs and call the function overload that takes FSavePackageArgs. Note that Conform is no longer implemented. |
![]() |
void | SetFolderName
(
FName name |
Unused property to be removed. Use something like FPackageName::GetLongPackagePath if requiring something similar. |
![]() |
void | UPackage::Guid has not been used by the engine for a long time and SetGuid will be removed. |