FPackageTrailerBuilder

This class is used to build a [FPackageTrailer](API\Runtime\CoreUObject\UObject\FPackageTrailer) and write it disk.

Choose your operating system:

Windows

macOS

Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/PackageTrailer.h

Include

#include "UObject/PackageTrailer.h"

Syntax

class FPackageTrailerBuilder

Remarks

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.

Constructors

Name Description

Public function

FPackageTrailerBuilder()

Public function

FPackageTrailerBuilder

(
    const FName& InPackageName
)

Destructors

Name Description

Public function

~FPackageTrailerBuilder()

Functions

Name Description

Public function

void

 

AddPayload

(
    const Virtualization::FPayloadId& ...,
    FCompressedBuffer Payload,
    AdditionalDataCallback&& Callback
)

Adds a payload to the builder to be written to the trailer.

Public function

bool

 

BuildAndAppendTrailer

(
    FLinkerSave* Linker,
    FArchive& DataArchive
)

Public function Static

FPackageTrai...

 

CreateFromTrailer

(
    const FPackageTrailer& Trailer,
    FArchive& Ar,
    const FName& PackageName
)

Creates a builder from a pre-existing FPackageTrailer.

Public function Static

TUniquePtr< ...

 

CreateReferenceToTrailer

(
    const FPackageTrailer& Trailer,
    const FName& PackageName
)

Creates a builder from a pre-existing FPackageTrailer that will will reference the local payloads of the source trailer.

Public function Const

int32

 

GetNumLocalPayloads()

Returns the number of payload entries in the builder with the access mode EPayloadAccessMode::Local

Public function Const

int32

 

GetNumPayloads()

Returns the total number of payload entries in the builder

Public function Const

int32

 

GetNumReferencedPayloads()

Returns the number of payload entries in the builder with the access mode EPayloadAccessMode::Referenced

Public function Const

int32

 

GetNumVirtualizedPayloads()

Returns the number of payload entries in the builder with the access mode EPayloadAccessMode::Virtualized

Public function Const

bool

 

IsEmpty()

Returns if the builder has any payload entries or not

Public function Const

bool

 

IsLocalPayloadEntry

(
    const Virtualization::FPayloadId& ...
)

Public function Const

bool

 

IsReferencedPayloadEntry

(
    const Virtualization::FPayloadId& ...
)

Public function Const

bool

 

IsVirtualizedPayloadEntry

(
    const Virtualization::FPayloadId& ...
)

Typedefs

Name

Description

AdditionalDataCallback