![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PackageTrailer.h>
Classes | |
| struct | FFooter |
| struct | FHeader |
Static Public Member Functions | |
| static bool | IsEnabled () |
| static COREUOBJECT_API bool | TryLoadFromPackage (const FPackagePath &PackagePath, FPackageTrailer &OutTrailer) |
| static COREUOBJECT_API bool | TryLoadFromFile (const FString &Path, FPackageTrailer &OutTrailer) |
| static COREUOBJECT_API bool | TryLoadFromArchive (FArchive &Ar, FPackageTrailer &OutTrailer) |
Friends | |
| class | FPackageTrailerBuilder |
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.
|
default |
|
default |
|
default |
|
default |
Returns the absolute offset of the payload in the package file, invalid and virtualized payloads will return INDEX_NONE
Returns the size of the payload on as stored on disk, invalid and virtualized payloads will return INDEX_NONE
| EPayloadStatus UE::FPackageTrailer::FindPayloadStatus | ( | const FIoHash & | Id | ) | const |
Attempt to find the status of the given payload. @See EPayloadStatus
| void UE::FPackageTrailer::ForEachPayload | ( | TFunctionRef< void(const FIoHash &, uint64, uint64, EPayloadAccessMode, UE::Virtualization::EPayloadFilterReason)> | Callback | ) | const |
Iterates over all payloads in the trailer and invokes the provoided callback on them
| int32 UE::FPackageTrailer::GetNumPayloads | ( | EPayloadFilter | Filter | ) | const |
Returns the number of payloads that the trailer owns that match the given filter type. @See EPayloadFilter
| int32 UE::FPackageTrailer::GetNumPayloads | ( | EPayloadStorageType | Type | ) | const |
Returns the number of payloads that the trailer owns with the given storage type. @See EPayloadStoragetype
| FPayloadInfo UE::FPackageTrailer::GetPayloadInfo | ( | const FIoHash & | Id | ) | const |
| TArray< FIoHash > UE::FPackageTrailer::GetPayloads | ( | EPayloadFilter | Filter | ) | const |
Returns an array of the payloads that match the given filter type. @See EPayloadFilter
| TArray< FIoHash > UE::FPackageTrailer::GetPayloads | ( | EPayloadStorageType | StorageType | ) | const |
Returns an array of the payloads with the given storage type. @See EPayloadStoragetype
| int64 UE::FPackageTrailer::GetTrailerLength | ( | ) | const |
Returns the total size of the of the trailer on disk in bytes
Returns if the feature is enabled or disabled.
Note that this is for development purposes only and should ship as always enabled!
|
inline |
Returns true if the trailer contains actual data from a package file and false if it just contains the defaults of an unloaded trailer.
| FCompressedBuffer UE::FPackageTrailer::LoadLocalPayload | ( | const FIoHash & | Id, |
| FArchive & | Ar | ||
| ) | const |
Loads a payload that is stored locally within the package trailer. Payloads stored externally (either referenced or virtualized) will not load.
| Id | The payload to load |
| Ar | The archive from which the payload trailer was also loaded from |
|
default |
|
default |
Serializes the trailer from the given archive assuming that the seek position of the archive is already at the correct position for the trailer.
| Ar | The archive to load the trailer from |
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.
| Ar | The archive to load the trailer from |
|
static |
Try to load a trailer from a given archive. Assumes that the trailer is at the end of the archive
|
static |
Try to load a trailer from a given file path.
|
static |
Try to load a trailer from a given package path. Note that it will always try to load the trailer from the workspace domain
Calling this indicates that the payload has been virtualized and will no longer be stored on disk.
| Identifier | The payload that has been virtualized |
|
friend |