Navigation
API > API/Runtime > API/Runtime/CoreUObject
This class is used to build a FPackageTrailer and write it disk.
While saving a package, payloads should be added to a FPackageTrailer via AddPayload then once the package has been saved to disk BuildAndAppendTrailer should be called.
| Name | FPackageTrailerBuilder |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/PackageTrailer.h |
| Include Path | #include "UObject/PackageTrailer.h" |
Syntax
class FPackageTrailerBuilder
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| UObject/PackageTrailer.h | |||
FPackageTrailerBuilder
(
FString&& DebugContext |
UObject/PackageTrailer.h | ||
FPackageTrailerBuilder
(
const FName& InPackageName |
UObject/PackageTrailer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FPackageTrailerBuilder() |
UObject/PackageTrailer.h |
Structs
| Name | Remarks |
|---|---|
| LocalEntry | All of the data required to add a payload that is stored locally within the trailer |
| ReferencedEntry | All of the data required to add a reference to a payload stored in another trailer |
| VirtualizedEntry | All of the data required to add a payload that is virtualized |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AdditionalDataCallback | TFunction< void(FLinkerSave &LinkerSave, const class FPackageTrailer &Trailer)> | UObject/PackageTrailer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Callbacks | TArray< AdditionalDataCallback > | Callbacks to invoke once the trailer has been written to the end of a package | UObject/PackageTrailer.h | |
| DebugContext | FString | Context used when giving error messages so that the user can identify the cause of problems | UObject/PackageTrailer.h | |
| LocalEntries | TMap< FIoHash, LocalEntry > | Payloads that will be stored locally when the trailer is written to disk | UObject/PackageTrailer.h | |
| ReferencedEntries | TMap< FIoHash, ReferencedEntry > | Payloads that reference entries in another trailer | UObject/PackageTrailer.h | |
| VirtualizedEntries | TMap< FIoHash, VirtualizedEntry > | Payloads that are already virtualized and so will not be written to disk | UObject/PackageTrailer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddPayload
(
const FIoHash& Identifier, |
Adds a payload to the builder to be written to the trailer. | UObject/PackageTrailer.h | |
void AddPayload
(
const FIoHash& Identifier, |
UObject/PackageTrailer.h | ||
void AddVirtualizedPayload
(
const FIoHash& Identifier, |
Adds an already virtualized payload to the builder to be written to the trailer. | UObject/PackageTrailer.h | |
bool BuildAndAppendTrailer
(
FLinkerSave* Linker, |
UObject/PackageTrailer.h | ||
bool BuildAndAppendTrailer
(
FLinkerSave* Linker, |
UObject/PackageTrailer.h | ||
uint64 CalculateTrailerLength () |
Returns the length of the trailer (in bytes) that the builder would currently create. | UObject/PackageTrailer.h | |
const FString & GetDebugContext() |
Returns the debug context associated with the builder, used for adding further description to error messages | UObject/PackageTrailer.h | |
int32 GetNumLocalPayloads() |
Returns the number of payload entries in the builder with the access mode EPayloadAccessMode::Local | UObject/PackageTrailer.h | |
int32 GetNumPayloads() |
Returns the total number of payload entries in the builder | UObject/PackageTrailer.h | |
int32 GetNumReferencedPayloads() |
Returns the number of payload entries in the builder with the access mode EPayloadAccessMode::Referenced | UObject/PackageTrailer.h | |
int32 GetNumVirtualizedPayloads() |
Returns the number of payload entries in the builder with the access mode EPayloadAccessMode::Virtualized | UObject/PackageTrailer.h | |
bool IsEmpty() |
Returns if the builder has any payload entries or not | UObject/PackageTrailer.h | |
bool IsLocalPayloadEntry
(
const FIoHash& Identifier |
UObject/PackageTrailer.h | ||
bool IsReferencedPayloadEntry
(
const FIoHash& Identifier |
UObject/PackageTrailer.h | ||
bool IsVirtualizedPayloadEntry
(
const FIoHash& Identifier |
UObject/PackageTrailer.h | ||
bool UpdatePayloadAsLocal
(
const FIoHash& Identifier, |
Allows the caller to replace a payload in the builder that is already marked as virtualized and replace it with one that will be stored locally. | UObject/PackageTrailer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FPackageTrailerBuilder CreateFromTrailer
(
const FPackageTrailer& Trailer, |
UObject/PackageTrailer.h | ||
static FPackageTrailerBuilder CreateFromTrailer
(
const FPackageTrailer& Trailer, |
Creates a builder from a pre-existing FPackageTrailer. | UObject/PackageTrailer.h | |
static TUniquePtr< UE::FPackageTrailerBuilder > CreateReferenceToTrailer
(
const FPackageTrailer& Trailer, |
UObject/PackageTrailer.h | ||
static TUniquePtr< UE::FPackageTrailerBuilder > CreateReferenceToTrailer
(
const FPackageTrailer& Trailer, |
Creates a builder from a pre-existing FPackageTrailer that will will reference the local payloads of the source trailer. | UObject/PackageTrailer.h |