Navigation
API > API/Runtime > API/Runtime/CoreUObject
Handles saving Unreal package files.
| Name | FLinkerSave |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/LinkerSave.h |
| Include Path | #include "UObject/LinkerSave.h" |
Syntax
class FLinkerSave :
public FLinker ,
public FArchiveUObject
Inheritance Hierarchy
- FArchiveState → FArchive → FArchiveUObject → FLinkerSave
- FLinkerTables → FLinker → FLinkerSave
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FLinkerSave
(
UPackage* InParent, |
Constructor for file writer | UObject/LinkerSave.h | |
FLinkerSave
(
UPackage* InParent, |
Constructor for custom savers. The linker assumes ownership of the custom saver. | UObject/LinkerSave.h | |
FLinkerSave
(
UPackage* InParent, |
Constructor for memory writer | UObject/LinkerSave.h | |
FLinkerSave
(
UPackage* InParent |
Partially construct the FLinkerSave. | UObject/LinkerSave.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FLinkerSave() |
UObject/LinkerSave.h |
Structs
| Name | Remarks |
|---|---|
| FSidecarStorageInfo |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AdditionalDataCallback | TUniqueFunction< void(FLinkerSave &ExportsArchive, FArchive &DataArchive, int64 DataStartOffset)> | Callback for arbitrary serializers to append data to the end of the ExportsArchive. | UObject/LinkerSave.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PackagesToScriptSHAMap | TMap< FString, TArray< uint8 > > | A mapping of package name to generated script SHA keys | UObject/LinkerSave.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdditionalDataToAppend | TArray< AdditionalDataCallback > | Array of callbacks that will be invoked when it is possible to serialize out data to the end of the output file. | UObject/LinkerSave.h | |
| bIsWritingHeaderSoftObjectPaths | bool | Flag that indicate if we are currently serializing the package header soft object paths. | UObject/LinkerSave.h | |
| bProceduralSave | bool | Set to true when the package is being saved due to a procedural save. | UObject/LinkerSave.h | |
| bRehydratePayloads | bool | When set to true, payloads that are currently virtualized should be downloaded and stored locally with the package | UObject/LinkerSave.h | |
| bUpdatingLoadedPath | bool | Set to true when the LoadedPath of the package being saved is being updated. | UObject/LinkerSave.h | |
| CellIndicesMap | TMap< Verse::VCell *, FPackageIndex > | UObject/LinkerSave.h | ||
| CurrentlySavingExport | FPackageIndex | UObject/LinkerSave.h | ||
| CurrentlySavingExportObject | UObject * | UObject/LinkerSave.h | ||
| DepListForErrorChecking | TArray< FPackageIndex > | UObject/LinkerSave.h | ||
| FileRegions | TArray< FFileRegion > | UObject/LinkerSave.h | ||
| NameIndices | TMap< FNameEntryId, int32 > | Map from FName to the index of the name in the name array written into the package header. | UObject/LinkerSave.h | |
| ObjectIndicesMap | TMap< TObjectPtr< UObject >, FPackageIndex > | Index array - location of the resource for a UObject is stored in the ObjectIndices array using the UObject's Index | UObject/LinkerSave.h | |
| PackageTrailerBuilder | TUniquePtr< UE::FPackageTrailerBuilder > | Gathers all payloads while save the package, so that they can be stored in a single data structure | UObject/LinkerSave.h | |
| PostSaveCallbacks | TArray< TUniqueFunction< void(const FPackagePath &PackagePath, FObjectPostSaveContext ObjectSaveContext)> > | Array of callbacks that will be invoked when the package has successfully saved to disk. | UObject/LinkerSave.h | |
| SaveContext | TRefCountPtr< FUObjectSerializeContext > | Save context associated with this linker | UObject/LinkerSave.h | |
| Saver | FArchive * | Variables. | UObject/LinkerSave.h | |
| SearchableNamesObjectMap | TMap< const UObject *, TArray< FName > > | List of Searchable Names, by object containing them. This gets turned into package indices later | UObject/LinkerSave.h | |
| SidecarDataToAppend | TArray< FSidecarStorageInfo > | Used by FEditorBulkData to add payloads to be added to the payload sidecar file (currently an experimental feature) | UObject/LinkerSave.h | |
| SoftObjectPathIndices | TMap< FSoftObjectPath, int32 > | Map from FSoftObjectPath to the index of the path in the soft object path array written into the package header. | UObject/LinkerSave.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDeclareRegionForEachAdditionalFile | bool | Whether a separate file region should be declared for each bulkdata. | UObject/LinkerSave.h | |
| bFileRegionsEnabled | bool | Whether file regions are enabled. | UObject/LinkerSave.h | |
| bSaveBulkDataByReference | bool | Whether saving bulk data by reference. | UObject/LinkerSave.h | |
| bSaveBulkDataToSeparateFiles | bool | Whether saving bulk data to separate files. | UObject/LinkerSave.h | |
| BulkDataAr | TMap< FBulkDataCookedIndex, TUniquePtr< FFileRegionMemoryWriter > > | Default bulk data archive. | UObject/LinkerSave.h | |
| Filename | FString | The name of the file for this package | UObject/LinkerSave.h | |
| LastDerivedDataIndex | int32 | The index of the last derived data chunk added to the package. | UObject/LinkerSave.h | |
| LogOutput | FOutputDevice * | Optional log output to bubble errors back up. | UObject/LinkerSave.h | |
| MemoryMappedBulkDataAr | TMap< FBulkDataCookedIndex, TUniquePtr< FFileRegionMemoryWriter > > | Memory mapped bulk data archive. | UObject/LinkerSave.h | |
| MemoryMappingAlignment | int64 | Alignment for memory mapped data . | UObject/LinkerSave.h | |
| OptionalBulkDataAr | TMap< FBulkDataCookedIndex, TUniquePtr< FFileRegionMemoryWriter > > | Optional bulk data archive. | UObject/LinkerSave.h | |
| SerializedBulkData | TMap< FBulkData *, int32 > | Map from bulk data object to resource index. | UObject/LinkerSave.h | |
| TransientPropertyOverrides | const TMap< UObject *, TSet< FProperty * > > * | UObject/LinkerSave.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UE::FDerivedData AddDerivedData
(
const UE::FDerivedData& Data |
Adds the derived data to the package. This is only supported when saving a cooked package. | UObject/LinkerSave.h | |
void AssignMemorySaver
(
bool bForceByteSwapping, |
Construct a FMemoryWriter archive and call AssignSaver with it. | UObject/LinkerSave.h | |
void AssignSaver
(
FArchive* InSaver, |
Assign the Saver that will receive the binary data for the package and write it to disk/memory/unspecified. | UObject/LinkerSave.h | |
bool CloseAndDestroySaver () |
Closes and deletes the Saver (file, memory or custom writer) which will close any associated file handle. | UObject/LinkerSave.h | |
void ForEachBulkDataCookedIndex
(
TUniqueFunction< void(FBulkDataCookedIndex, FFileRegionMemoryWriter&)>&& Func, |
UObject/LinkerSave.h | ||
FFileRegionMemoryWriter & GetBulkDataArchive
(
FBulkDataCookedIndex CookedIndex |
UObject/LinkerSave.h | ||
FFileRegionMemoryWriter & GetBulkDataArchive () |
UObject/LinkerSave.h | ||
const FString & GetFilename() |
Get the filename being saved to | UObject/LinkerSave.h | |
FFileRegionMemoryWriter & GetMemoryMappedBulkDataArchive () |
UObject/LinkerSave.h | ||
FFileRegionMemoryWriter & GetMemoryMappedBulkDataArchive
(
FBulkDataCookedIndex CookedIndex |
UObject/LinkerSave.h | ||
FFileRegionMemoryWriter & GetOptionalBulkDataArchive () |
UObject/LinkerSave.h | ||
FFileRegionMemoryWriter & GetOptionalBulkDataArchive
(
FBulkDataCookedIndex CookedIndex |
UObject/LinkerSave.h | ||
FOutputDevice * GetOutputDevice() |
Returns an output Device that can be used to log info, warnings and errors etc. | UObject/LinkerSave.h | |
bool HasCookedIndexBulkData() |
UObject/LinkerSave.h | ||
int32 MapName
(
FNameEntryId Name |
Returns the appropriate name index for the source name, or INDEX_NONE if not found in NameIndices | UObject/LinkerSave.h | |
FPackageIndex MapObject
(
TObjectPtr< const UObject > Object |
Returns the appropriate package index for the source object, or default value if not found in ObjectIndicesMap | UObject/LinkerSave.h | |
int32 MapSoftObjectPath
(
const FSoftObjectPath& SoftObjectPath |
Returns the appropriate soft object path index for the source soft object path, or INDEX_NONE if not found. | UObject/LinkerSave.h | |
void OnPostSave
(
const FPackagePath& PackagePath, |
Invoke all of the callbacks in PostSaveCallbacks and then empty it. | UObject/LinkerSave.h | |
void OnPostSaveBulkData() |
Triggered after bulk data payloads has been serialized to disk/package writer. | UObject/LinkerSave.h | |
| This fixes the warning : 'FLinkerSave::Serialize' hides overloaded virtual function | UObject/LinkerSave.h | ||
void SetDeclareRegionForEachAdditionalFile
(
bool bValue |
Sets whether a separate file regions should be declared for each bulkdata | UObject/LinkerSave.h | |
void SetFileRegionsEnabled
(
bool bEnabled |
Sets whether file regions will be written or not. | UObject/LinkerSave.h | |
void SetMemoryMapAlignment
(
int64 InAlignment |
Set target platform memory map alignment. A negative value disables memory mapped bulk data. | UObject/LinkerSave.h | |
void SetOutputDevice
(
FOutputDevice* InOutputDevice |
Set the output device used to log errors, if any. | UObject/LinkerSave.h | |
void SetSaveBulkDataByReference
(
bool bValue |
Sets whether saving bulk data by reference, i.e. leaving the bulk data payload in the original .uasset file when using EditorDomain. | UObject/LinkerSave.h | |
void SetSaveBulkDataToSeparateFiles
(
bool bValue |
Sets whether bulk data will be stored in the Linker archive (.uasset) or in sepearate files (.ubulk, .m.ubulk, .opt.ubulk) . | UObject/LinkerSave.h | |
| Sets the map of overrided properties for each export that should be treated as transient, and nulled out when serializing | UObject/LinkerSave.h | ||
bool TryAssignFileSaver
(
FStringView InFilename, |
Construct a file saver from IPlatformFile and call AssignSaver with it. | UObject/LinkerSave.h |
Overridden from FLinker
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FString GetDebugName() |
Returns a descriptor of the PackagePath this Linker is reading from or writing to, usable for an identifier in warning and log messages | UObject/LinkerSave.h |
Overridden from FArchive
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void MarkScriptSerializationEnd
(
const UObject* Obj |
Called when an object stops serializing property data using script serialization. | UObject/LinkerSave.h | |
virtual void MarkScriptSerializationStart
(
const UObject* Obj |
Called when an object begins serializing property data using script serialization. | UObject/LinkerSave.h | |
virtual void PopDebugDataString() |
UObject/LinkerSave.h | ||
virtual void PopSerializedProperty
(
FProperty* InProperty, |
UObject/LinkerSave.h | ||
virtual void PushDebugDataString
(
const FName& DebugData |
Proxy for debugdata | UObject/LinkerSave.h | |
virtual void PushSerializedProperty
(
FProperty* InProperty, |
UObject/LinkerSave.h | ||
virtual void Seek
(
int64 InPos |
UObject/LinkerSave.h | ||
virtual void Serialize
(
void* V, |
UObject/LinkerSave.h | ||
virtual bool SerializeBulkData
(
FBulkData& BulkData, |
UObject/LinkerSave.h | ||
virtual void UsingCustomVersion
(
const FGuid& Guid |
UObject/LinkerSave.h |
Overridden from FArchiveState
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FString GetArchiveName() |
UObject/LinkerSave.h | ||
virtual FLinker * GetLinker() |
If this archive is a FLinkerLoad or FLinkerSave, returns a pointer to the FLinker portion. | UObject/LinkerSave.h | |
virtual FUObjectSerializeContext * GetSerializeContext() |
UObject/LinkerSave.h | ||
virtual bool IsEditorOnlyPropertyOnTheStack() |
UObject/LinkerSave.h | ||
virtual void SetDebugSerializationFlags
(
uint32 InCustomFlags |
UObject/LinkerSave.h | ||
virtual void SetFilterEditorOnly
(
bool bInFilterEditorOnly |
UObject/LinkerSave.h | ||
virtual void SetSerializedProperty
(
FProperty* InProperty |
UObject/LinkerSave.h | ||
virtual void SetSerializedPropertyChain
(
const FArchiveSerializedPropertyChain* InSerializedPropertyChain, |
UObject/LinkerSave.h | ||
virtual void SetUseUnversionedPropertySerialization
(
bool bInUseUnversioned |
UObject/LinkerSave.h | ||
virtual bool ShouldSkipProperty
(
const FProperty* InProperty |
UObject/LinkerSave.h | ||
virtual int64 Tell() |
UObject/LinkerSave.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AssignSaverInternal
(
FArchive* InSaver, |
UObject/LinkerSave.h | ||
const TMap< FBulkDataCookedIndex, TUniquePtr< FFileRegionMemoryWriter > > & GetArchives
(
EBulkDataPayloadType Type |
UObject/LinkerSave.h | ||
void SerializeObjectPointer
(
const FObjectPtr& Value |
UObject/LinkerSave.h | ||
void SetFilename
(
FStringView InFilename |
Set the filename being saved to | UObject/LinkerSave.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static ELinkerType::Type StaticType() |
UObject/LinkerSave.h |