Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/UObject
Inheritance Hierarchy
- FLinker
- FArchiveUObject
- FLinkerSave
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/LinkerSave.h |
| Include | #include "UObject/LinkerSave.h" |
Syntax
class FLinkerSave :
public FLinker,
public FArchiveUObject
Remarks
Handles saving Unreal package files.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< AdditionalDataCallback > | AdditionalDataToAppend | Array of callbacks that will be invoked when it is possible to serialize out data to the end of the output file. | |
| bool | bIsWritingHeader | Flag that indicate if we are currently serializing the package header. | |
| bool | bProceduralSave | Set to true when the package is being saved due to a procedural save. | |
| bool | bRehydratePayloads | When set to true, payloads that are currently virtualized should be downloaded and stored locally with the package | |
| bool | bUpdatingLoadedPath | Set to true when the LoadedPath of the package being saved is being updated. | |
| FPackageIndex | CurrentlySavingExport | ||
| UObject * | CurrentlySavingExportObject | ||
| TArray< FPackageIndex > | DepListForErrorChecking | ||
| TArray< FFileRegion > | FileRegions | ||
| TMap< FNameEntryId, int32 > | NameIndices | Map from FName to the index of the name in the name array written into the package header. | |
| TMap< TObjectPtr< UObject >, FPackageIndex > | ObjectIndicesMap | Index array - location of the resource for a UObject is stored in the ObjectIndices array using the UObject's Index | |
| TUniquePtr< UE::FPackageTrailerBuilder > | PackageTrailerBuilder | Gathers all payloads while save the package, so that they can be stored in a single data structure | |
| TArray< TUniqueFunction< void(const FPackagePath &PackagePath, FObjectPostSaveContext ObjectSaveCont... | PostSaveCallbacks | Array of callbacks that will be invoked when the package has successfully saved to disk. | |
| TRefCountPtr< FUObjectSerializeContext > | SaveContext | Save context associated with this linker | |
| FArchive * | Saver | Variables. | |
| TMap< const UObject *, TArray< FName > > | SearchableNamesObjectMap | List of Searchable Names, by object containing them. This gets turned into package indices later | |
| TArray< FSidecarStorageInfo > | SidecarDataToAppend | Used by FEditorBulkData to add payloads to be added to the payload sidecar file (currently an experimental feature) | |
| TMap< FSoftObjectPath, int32 > | SoftObjectPathIndices | Map from FSoftObjectPath to the index of the path in the soft object path array written into the package header. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FLinkerSave
(
UPackage* InParent, |
Constructor for memory writer | ||
FLinkerSave
(
UPackage* InParent, |
Constructor for file writer | ||
FLinkerSave
(
UPackage* InParent, |
Constructor for custom savers. The linker assumes ownership of the custom saver. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~FLinkerSave () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UE::FDerivedData | AddDerivedData
(
const UE::FDerivedData& Data |
Adds the derived data to the package. This is only supported when saving a cooked package. | |
| bool | Closes and deletes the Saver (file, memory or custom writer) which will close any associated file handle. | ||
| FFileRegionMemoryWriter & | |||
| const FString & | GetFilename () |
Get the filename being saved to | |
| FFileRegionMemoryWriter & | |||
| FFileRegionMemoryWriter & | |||
| FOutputDevice * | Returns an output Device that can be used to log info, warnings and errors etc. | ||
| int32 | MapName
(
FNameEntryId Name |
Returns the appropriate name index for the source name, or INDEX_NONE if not found in NameIndices | |
| FPackageIndex | MapObject
(
TObjectPtr< const UObject > Object |
Returns the appropriate package index for the source object, or default value if not found in ObjectIndicesMap | |
| int32 | MapSoftObjectPath
(
const FSoftObjectPath& SoftObjectPath |
Returns the appropriate soft object path index for the source soft object path, or INDEX_NONE if not found. | |
| void | OnPostSave
(
const FPackagePath& PackagePath, |
Invoke all of the callbacks in PostSaveCallbacks and then empty it. | |
| void | Triggered after bulk data payloads has been serialized to disk/package writer. | ||
| bool | SerializeBulkData
(
FBulkData& BulkData, |
||
| void | SetDeclareRegionForEachAdditionalFile
(
bool bValue |
Sets whether a separate file regions should be declared for each bulkdata | |
| void | SetFilename
(
FStringView InFilename |
Set the filename being saved to | |
| void | SetFileRegionsEnabled
(
bool bEnabled |
Sets whether file regions will be written or not. | |
| void | SetMemoryMapAlignment
(
int64 InAlignment |
Set target platform memory map alignment. A negative value disables memory mapped bulk data. | |
| void | SetOutputDevice
(
FOutputDevice* InOutputDevice |
Set the output device used to log errors, if any. | |
| 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. | |
| 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) . | |
| void | SetTransientPropertyOverrides
(
const TMap< UObject*, TSet< FProperty* >>& InTransientPropertyOverrides |
Sets the map of overrided properties for each export that should be treated as transient, and nulled out when serializing | |
| ELinkerType::Type | StaticType () |
||
| void | Sets a flag indicating that this archive contains data required to be gathered for localization. |
Overridden from FLinker
| Type | Name | Description | |
|---|---|---|---|
| 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 |
Overridden from FArchive
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | PushDebugDataString
(
const FName& DebugData |
Proxy for debugdata | |
| void | Seek
(
int64 InPos |
Attempts to set the current offset into backing data storage, this will do nothing if there is no storage. | |
| void | Serialize
(
void* V, |
||
| void | UsingCustomVersion
(
const FGuid& Guid |
Registers the custom version to the archive. |
Overridden from FArchiveState
| Type | Name | Description | |
|---|---|---|---|
| FString | Returns the name of the Archive. | ||
| FLinker * | GetLinker () |
If this archive is a FLinkerLoad or FLinkerSave, returns a pointer to the FLinker portion. | |
| FUObjectSerializeContext * | Gets the current UObject serialization context for this archive. | ||
| void | SetFilterEditorOnly
(
bool bInFilterEditorOnly |
Sets whether we should be filtering editor only. | |
| void | SetSerializeContext
(
FUObjectSerializeContext* InLoadContext |
Sets the current UObject serialization context for this archive. | |
| void | SetUseUnversionedPropertySerialization
(
bool bInUseUnversioned |
Sets whether tagged property serialization should be replaced by faster unversioned serialization. | |
| bool | ShouldSkipProperty
(
const FProperty* InProperty |
Checks whether the archive wants to skip the property independent of the other flags | |
| int64 | Tell () |
Returns the current location within the backing data storage, which can possibly be passed to Seek later to restore a read/write location. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FArchive & | operator<<
(
UObject*& Value |
Serializes an UObject value from or into this archive. | |
| FArchive & | operator<<
(
FName& Value |
Serializes an FName value from or into this archive. | |
| FArchive & | operator<<
(
FLazyObjectPtr& Value |
Serializes a lazy object pointer value from or into this archive. | |
| FArchive & | operator<<
(
FSoftObjectPath& Value |
Serializes soft object paths from or into this archive. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FSidecarStorageInfo |
Typedefs
| Name | Description |
|---|---|
| AdditionalDataCallback | Callback for arbitrary serializers to append data to the end of the ExportsArchive. |
Constants
| Name | Description |
|---|---|
| PackagesToScriptSHAMap | A mapping of package name to generated script SHA keys |