Navigation
API > API/Runtime > API/Runtime/CoreUObject
The package trailer should only ever stored the payloads in the workspace domain. If the package trailer is in the editor domain then it's values should be valid, but when loading non-virtualized payloads they need to come from the workspace domain package.
| Name | FPackageTrailer |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/PackageTrailer.h |
| Include Path | #include "UObject/PackageTrailer.h" |
Syntax
class FPackageTrailer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPackageTrailer
(
FPackageTrailer&& Other |
UObject/PackageTrailer.h | ||
FPackageTrailer
(
const FPackageTrailer& Other |
UObject/PackageTrailer.h | ||
| UObject/PackageTrailer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FPackageTrailer() |
UObject/PackageTrailer.h |
Structs
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Header | FHeader | The header of the trailer. | UObject/PackageTrailer.h | |
| TrailerPositionInFile | int64 | Where in the workspace domain package file the trailer is located | UObject/PackageTrailer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int64 FindPayloadOffsetInFile
(
const FIoHash& Id |
Returns the absolute offset of the payload in the package file, invalid and virtualized payloads will return INDEX_NONE | UObject/PackageTrailer.h | |
int64 FindPayloadSizeOnDisk
(
const FIoHash& Id |
Returns the size of the payload on as stored on disk, invalid and virtualized payloads will return INDEX_NONE | UObject/PackageTrailer.h | |
EPayloadStatus FindPayloadStatus
(
const FIoHash& Id |
Attempt to find the status of the given payload. @See EPayloadStatus | UObject/PackageTrailer.h | |
void ForEachPayload
(
TFunctionRef< void(const FIoHash&, uint64, uint64, EPayloadAccessMode, UE::Virtualization::EPayload... |
Iterates over all payloads in the trailer and invokes the provoided callback on them | UObject/PackageTrailer.h | |
int32 GetNumPayloads
(
EPayloadFilter Filter |
Returns the number of payloads that the trailer owns that match the given filter type. | UObject/PackageTrailer.h | |
int32 GetNumPayloads
(
EPayloadStorageType Type |
Returns the number of payloads that the trailer owns with the given storage type. | UObject/PackageTrailer.h | |
FPayloadInfo GetPayloadInfo
(
const FIoHash& Id |
UObject/PackageTrailer.h | ||
TArray< FIoHash > GetPayloads
(
EPayloadFilter Filter |
Returns an array of the payloads that match the given filter type. @See EPayloadFilter | UObject/PackageTrailer.h | |
TArray< FIoHash > GetPayloads
(
EPayloadStorageType StorageType |
Returns an array of the payloads with the given storage type. @See EPayloadStoragetype | UObject/PackageTrailer.h | |
int64 GetTrailerLength() |
Returns the total size of the of the trailer on disk in bytes | UObject/PackageTrailer.h | |
bool IsValid() |
Returns true if the trailer contains actual data from a package file and false if it just contains the defaults of an unloaded trailer. | UObject/PackageTrailer.h | |
FCompressedBuffer LoadLocalPayload
(
const FIoHash& Id, |
Loads a payload that is stored locally within the package trailer. | UObject/PackageTrailer.h | |
bool TryLoad
(
FArchive& Ar |
Serializes the trailer from the given archive assuming that the seek position of the archive is already at the correct position for the trailer. | UObject/PackageTrailer.h | |
bool TryLoadBackwards
(
FArchive& Ar |
Serializes the trailer from the given archive BUT assumes that the seek position of the archive is at the end of the trailer and so will attempt to read the footer first and use that to find the start of the trailer in order to read the header. | UObject/PackageTrailer.h | |
bool UpdatePayloadAsVirtualized
(
const FIoHash& Identifier |
Calling this indicates that the payload has been virtualized and will no longer be stored on disk. | UObject/PackageTrailer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsEnabled () |
Returns if the feature is enabled or disabled. | UObject/PackageTrailer.h | |
static bool TryLoadFromArchive
(
FArchive& Ar, |
Try to load a trailer from a given archive. Assumes that the trailer is at the end of the archive | UObject/PackageTrailer.h | |
static bool TryLoadFromFile
(
const FString& Path, |
Try to load a trailer from a given file path. | UObject/PackageTrailer.h | |
static bool TryLoadFromPackage
(
const FPackagePath& PackagePath, |
Try to load a trailer from a given package path. | UObject/PackageTrailer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPackageTrailer & operator=
(
FPackageTrailer&& Other |
UObject/PackageTrailer.h | ||
FPackageTrailer & operator=
(
const FPackageTrailer& Other |
UObject/PackageTrailer.h |