![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Archive.h>
Inheritance diagram for FArchiveState:Classes | |
| struct | FFastPathLoadBuffer |
Protected Member Functions | |
| CORE_API void | CopyTrivialFArchiveStatusMembers (const FArchiveState &ArchiveStatusToCopy) |
Static Protected Member Functions | |
| static CORE_API void | LinkProxy (FArchiveState &Inner, FArchiveState &Proxy) |
| static CORE_API void | UnlinkProxy (FArchiveState &Inner, FArchiveState &Proxy) |
Friends | |
| class | FArchive |
Returns true if the current location within the backing data storage is at the end, always returns false if there is no storage.
Reimplemented in FArchive, FBitReader, FBufferWriter, FBulkDataWriter, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FBufferReaderBase, FArchiveProxy, and FLocalFileStreamFArchive.
| void FArchiveState::ClearError | ( | ) |
Sets ArIsError to false, this does not clear any CriticalErrors
|
inline |
Returns true if this archive contains native or generated code.
|
inline |
|
inline |
Returns the cooking target platform. Returns null if not being serialized from Savepackage, or if it is an editor save rather than a cook save.
|
protected |
Copies all of the members except CustomVersionContainer
Called to get the computed size from a size-detecting archive after it has finished serializing.
Reimplemented in FArchiveCountConfigMem, FArchive, FArchiveCountMemGUID, FArchiveCountStructMem, FArchiveProxy, and FArchiveCountMem.
Queries a custom version from the archive. If the archive is being used to write, the custom version must have already been registered.
| Key | The guid of the custom version to query. |
|
inline |
Returns true if this archive should handle delta serialization for properties.
|
inline |
Returns true if this archive should perform delta serialization within properties (e.g. TMaps and TSets).
|
virtual |
|
inline |
Returns the compiled engine version used for this archive.
|
inline |
Returns true if this archive should always swap bytes, ignoring endian rules.
| FORCEINLINE void FArchiveState::ForEachState | ( | T | Func | ) |
|
virtual |
Called to retrieve the archetype from the event driven loader. If this returns null, then call GetArchetype yourself.
Reimplemented in FArchive, FExportArchive, FArchiveProxy, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchetypeDeltaWriter, FLinkerLoad, and FCPFUOWriter.
|
virtual |
Returns the name of the Archive. Useful for getting the name of the package a struct or object is in when a loading error occurs.
This is overridden for the specific Archive Types
Reimplemented in FArchiveMD5, FBufferReaderWithSHA, FArchive, FArrayReader, TBufferArchive< IndexSize >, TBufferArchive< 32 >, TBufferArchive< 64 >, FBufferReaderBase, FBufferReader, FBufferWriter, FMemoryArchive, FArchiveDescribeReference, FArchiveFindAllRefs, FArchiveCrc32, FArchiveFindCulprit, FArchiveObjectCrc32, FArchiveReplaceObjectRefBase, FArchiveShowReferences, FBulkDataReader, FBulkDataWriter, FDuplicateDataReader, FDuplicateDataWriter, FFindReferencersArchive, FPreloadableArchive, FPreloadableArchiveProxy, FPackageReader, FNonBufferingReadOnlyArchive, FArchiveFileWriterDummy, FArchiveFileReaderGeneric, FArchiveFileWriterGeneric, FArchiveProxy, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriterBase< ArrayAllocatorType >, FStaticMemoryReader, FTransactionallySafeArchiveWriter, FExportArchive, FAsyncArchive, UE::StructUtils::FHashBuilder, UE::StructUtils::FArchiveCityHash64, PackageReloadInternal::FReplaceObjectReferencesArchive, UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryReader >, UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryWriter >, FPackageHarvester, FArchiveCountMem, FObjectReader, FObjectWriter, FLinkerLoad, FLinkerSave, FMaterialResourceMemoryWriter, FMaterialResourceProxyReader, UE::JsonUtilities::FArchiveMD5Generator, FEventParameterWriter, FEventParameterReader, FManifestWriter, and FManifestReader.
|
inline |
|
inline |
|
virtual |
Gets the custom version numbers for this archive. These are used to check for system or game-specific version numbers.
Reimplemented in FArchive, FNameTableArchiveReader, FArchiveProxy, and FMaterialResourceMemoryWriter.
|
inline |
Returns the editor-only debug serialization flags.
|
inline |
|
inlinevirtual |
Returns lowest level archive state, proxy archives will override this.
Reimplemented in FArchive, and FArchiveProxy.
If this archive is a FLinkerLoad or FLinkerSave, returns a pointer to the ULinker portion.
Reimplemented in FArchive, FLinkerSave, FArchiveProxy, and FLinkerLoad.
|
inline |
Returns the maximum size of data that this archive is allowed to serialize.
|
inlinevirtual |
When migrating objects, we may need some context as to the intent of the migration during serialization
Reimplemented in FArchive, UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryReader >, and UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryWriter >.
|
inline |
Returns this archive's property serialization modifier flags.
|
inline |
|
inline |
Return the API object used to record extra data for SavePackage calls (e.g. cook build dependencies). Returns null if not being serialized from SavePackage.
|
inline |
Gets the property that is currently being serialized
|
inline |
Get the raw serialized property chain for this archive
Gets the chain of properties that are currently being serialized
|
inline |
Checks to see if all of the passed in property serialization modifier flags are set.
|
inline |
Checks to see if any of the passed in property serialization modifier flags are set.
|
inline |
Returns true if this archive sould allow lazy loading of bulk / secondary data.
|
inline |
Returns true if data larger than 1 byte should be swapped to deal with endian mismatches.
|
inline |
Checks whether the archive is used for cooking.
|
inline |
Returns true if this archive is counting memory, normally CountBytes is called to get the size.
|
inline |
Returns true if this archive contains critical errors that cannot be recovered from.
|
inline |
Returns true if this archive contains errors, which means that further serialization is generally not safe.
|
inline |
Indicates whether this archive is filtering editor-only on save or contains data that had editor-only content stripped.
|
inline |
Returns true if this archive wants to always save strings in UTF16 format even if they are ANSI characters.
|
inline |
Returns true if this archive should ignore archetype references for structs and classes.
|
inline |
Returns true if this archive should ignore the ClassGeneratedBy reference in UClass.
|
inline |
Returns true if this archive should ignore the Class reference in UObject.
|
inline |
Returns true if this archive should ignore the Outer reference in UObject.
|
inline |
Returns true if this archive is for loading data.
|
inline |
Returns true if this archive is loading from a cooked package.
|
inlineconstexpr |
Returns true if this Archive is migrating remote object
|
inline |
Returns true if this archive should modify/search weak object references as well as strong ones.
|
inline |
Whether or not this archive is serializing data being sent/received by the netcode
|
inline |
Returns true if this archive is only looking for UObject references. This can be false for reference collectors looking for more general references.
|
inline |
Returns true if this archive is saving or loading data destined for persistent storage and should skip transient data. This is also true for some intermediate archives for tasks like duplication that are eventually destined for persistent storage.
|
inline |
Indicates whether this archive is saving or loading game state
|
inline |
Returns true if this archive is for saving data, this can also be a pre-save preparation archive.
|
inline |
Indicates when the archive is serializing an Optional object. Will only return true when Ar.IsSaving() is also true
|
inline |
Returns true if this archive is currently serializing class/struct default values.
|
inline |
Returns true if this archive serializes to a structured text format. Text format archives should use high level constructs from FStructuredArchive for delimiting data rather than manually seeking through the file.
|
inline |
Returns true if this archive is transacting, which is used to keep track of changes to objects for things like the editor undo system.
|
inline |
Returns the licensee-specific version used for this archive, will be 0 by default.
|
staticprotected |
|
inline |
Returns true if this archive contains data required to be gathered for localization.
Resets all of the base archive members.
Reimplemented in FArchive, FLocalFileStreamFArchive, FArchiveMD5, FBitWriter, FArchiveCrc32, and FOutBunch.
|
virtual |
Resets the custom version numbers for this archive.
Reimplemented in FArchive, FNameTableArchiveReader, and FArchiveProxy.
| void FArchiveState::SetArchiveState | ( | const FArchiveState & | InState | ) |
Modifies current archive state, can be used to override flags.
Toggle byte order swapping. This is needed in rare cases when we already know that the data swapping has already occurred or if we know that it will be handled later.
| Enabled | set to true to enable byte order swapping |
|
inline |
| void FArchiveState::SetCriticalError | ( | ) |
Sets the archiver IsCriticalError and IsError to true. Also sets CriticalError in the proxy archiver if one is wrapping this.
| void FArchiveState::SetCustomVersion | ( | const struct FGuid & | Key, |
| int32 | Version, | ||
| FName | FriendlyName | ||
| ) |
Sets a specific custom version
| Key | - The guid of the custom version to query. |
| Version | - The version number to set key to |
| FriendlyName | - Friendly name corresponding to the key |
|
virtual |
Sets the custom version numbers for this archive.
| CustomVersionContainer | - The container of custom versions to copy into the archive. |
Reimplemented in FArchive, FNameTableArchiveReader, and FArchiveProxy.
Sets the archives custom serialization modifier flags (nothing to do with PortFlags or Custom versions)
| InCustomFlags | the new flags to use for custom serialization |
Reimplemented in FArchive, FArchiveProxy, and FLinkerSave.
|
virtual |
Sets the archive engine version. Used by the code that makes sure that FLinkerLoad's internal archive versions match the file reader it creates.
| InVer | new version number |
Reimplemented in FArchive.
| void FArchiveState::SetError | ( | ) |
Sets ArIsError to true. Also sets error in the proxy archiver if one is wrapping this.
Sets a flag indicating that this archive needs to filter editor-only content.
| InFilterEditorOnly | Whether to filter editor-only content. |
Reimplemented in FLinkerSave, FArchive, and FArchiveProxy.
Sets whether this archive wants to force saving as Unicode. This is needed when we need to make sure ANSI strings are saved as Unicode.
| bInForceUnicode | true if this archive wants to force saving as Unicode, false otherwise. |
Reimplemented in FArchive.
Sets whether this archive is for loading data.
| bInIsLoading | true if this archive is for loading, false otherwise. |
Reimplemented in FArchive.
Sets whether the archive is loading from a cooked package.
| bInIsLoadingFromCookedPackage | true if this archive is loading from a cooked package, false otherwise |
Reimplemented in FArchive.
Sets whether this archive is to persistent storage.
| bInIsPersistent | true if this archive is to persistent storage, false otherwise. |
Reimplemented in FArchive.
Sets whether this archive is for saving data.
| bInIsSaving | true if this archive is for saving, false otherwise. |
Reimplemented in FArchive.
Sets whether this archive is in text format.
| bInIsTextFormat | true if this archive is in text format, false otherwise. |
Reimplemented in FArchive.
Sets whether this archive is for transacting.
| bInIsTransacting | true if this archive is for transacting, false otherwise. |
Reimplemented in FArchive.
Sets the archive licensee version number. Used by the code that makes sure that FLinkerLoad's internal archive versions match the file reader it creates.
| Ver | new version number |
Reimplemented in FArchive.
If set true, this archive is migrating remote objects
| bMigrating | Whether this archive is migrating remote objects |
Sets the archive's property serialization modifier flags
| InPortFlags | the new flags to use for property serialization |
|
inline |
Marks that this archive is one of the archives used by SavePackage, and provides access to data and functions used only during savepackage, such as the cook data bundle for information about the cook being conducted (if applicable) and writing build dependencies for assetregistry. Must be set only after setting the loading/saving/transacting flags.
Set whether or not this archive is current serializing an Optional object
| InFilterEditorOnly | Whether to filter editor-only content. |
Reimplemented in FArchive.
|
inlinevirtual |
Overrides the property that is currently being serialized
| InProperty | Pointer to the property that is currently being serialized |
Reimplemented in FArchive, FArchiveProxy, and FLinkerSave.
|
virtual |
Set the raw serialized property chain for this archive, optionally overriding the serialized property too (or null to use the head of the property chain)
Reimplemented in FArchive, FArchiveProxy, and FLinkerSave.
Set whether or not it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.
| Enabled | Set to true to enable skip serialization on compiling assets. |
If set true, UsingCurrentVersion will not query the version registry to get the latest version data for the key if the version key is already set in the local container. Querying the version registry is not cheap, and the look up time increases as more custom versions are registered, therefore if you don't change the registered custom version data once is set in the archive Setting this to true should improve serialization performance by skipping the step entirely.
| bShouldSkip | Whether we should skip the checking the version registry for new version data if the version key is already set |
|
virtual |
Sets the archive version number. Used by the code that makes sure that FLinkerLoad's internal archive versions match the file reader it creates.
| UEVer | new version number |
Reimplemented in FArchive.
Sets whether tagged property serialization should be replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.
Reimplemented in FArchive, and FLinkerSave.
|
virtual |
Sets whether this archive wants binary property serialization.
| bInWantBinaryPropertySerialization | true if this archive wants binary serialization, false otherwise. |
Reimplemented in FArchive.
|
inline |
Returns true if this archive should ignore bulk data.
|
inline |
Returns true if it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.
Checks whether the archive wants to skip the property independent of the other flags
Reimplemented in FArchive, FArchiveProxy, FTextReferencesArchive, FPackageHarvester, FLinkerSave, FDataCachePropertyWriter, FDataCachePropertyReader, FActorPropertyReader, FPIEFixupSerializer, and UE::Transaction::FDiffableObjectDataWriter.
|
inline |
Returns true if this Archive does not update the custom version data for a given key if has already been set previously in the local custom versions container
Returns the current location within the backing data storage, which can possibly be passed to Seek later to restore a read/write location. If this returns -1, there is no backing data storage and Seek will not function.
Reimplemented in FArchive, FArchiveLoadCompressedProxy, FArchiveSaveCompressedProxy, FBufferWriter, FBulkDataWriter, FDuplicateDataReader, FDuplicateDataWriter, FLinkerSave, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FMemoryArchive, FTransactionallySafeArchiveWriter, FPackageReader, UE::AssetDataGather::Private::FChecksumArchiveWriter, UE::AssetDataGather::Private::FChecksumArchiveReader, FNameTableArchiveReader, FArchiveFileWriterDummy, FArchiveProxy, FExportArchive, FAsyncArchive, FLinkerExportArchive, FMaterialResourceProxyReader, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::Internal::FSerializedObjectDataWriterCommon, FLocalFileStreamFArchive, FManifestWriter, FManifestReader, FSignedArchiveReader, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
|
inline |
Sets a flag indicating that this archive contains native or generated code.
|
inline |
| void FArchiveState::ThisRequiresLocalizationGather | ( | ) |
Sets a flag indicating that this archive contains data required to be gathered for localization.
Returns total size of the backing data storage.
Reimplemented in FArchive, FArrayReader, FBufferWriter, FBulkDataWriter, FDuplicateDataReader, FDuplicateDataWriter, FObjectReader, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FSkeletalMeshLODSizeCounter, FPackageReader, FNameTableArchiveReader, FArchiveFileWriterGeneric, FArchiveProxy, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriterBase< ArrayAllocatorType >, FStaticMemoryReader, FExportArchive, FAsyncArchive, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::Internal::FSerializedObjectDataWriterCommon, FSharedMemoryReader, FSharedMemoryWriter, FLocalFileStreamFArchive, FManifestWriter, FManifestReader, FSignedArchiveReader, FNonBufferingReadOnlyArchive, and FArchiveFileReaderGeneric.
|
inline |
Gets the current UObject serialization context for this archive.
|
inline |
Returns the global engine serialization version used for this archive.
|
staticprotected |
Checks whether the archive is used to resolve out-of-date enum indexes If function returns true, the archive should be called only for objects containing user defined enum
Reimplemented in FArchive, and FArchiveProxy.
|
inline |
Returns true if tagged property serialization should be replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.
|
inline |
Returns true if this archive wants properties to be serialized in binary form instead of safer but slower tagged form.
| FFastPathLoadBuffer* FArchiveState::ActiveFPLB |
| uint8 FArchiveState::ArAllowLazyLoading |
Whether to allow lazy loading of bulk/secondary data.
| uint8 FArchiveState::ArContainsCode |
Quickly tell if an archive contains script code.
| const struct FCustomPropertyListNode* FArchiveState::ArCustomPropertyList |
Custom property list attribute. If the flag below is set, only these properties will be iterated during serialization. If NULL, then no properties will be iterated.
|
protected |
Holds the engine version.
| UE_DEPRECATED (5.6, "Public access to ArRequiresLocalizationGather has been deprecated - please use Ar.RequiresLocalizationGather() and Ar.ThisRequiresLocalizationGather() for getting and setting respectively.") uint8 ArRequiresLocalizationGather uint8 FArchiveState::ArForceByteSwapping |
Used to determine whether FArchive contains data required to be gathered for localization. Whether we should forcefully swap bytes.
|
protected |
Whether this archive wants to always save strings in UTF16 format even if they are ANSI characters
| uint8 FArchiveState::ArIgnoreArchetypeRef |
If true, we will not serialize archetype references for structs and classes.
| uint8 FArchiveState::ArIgnoreClassGeneratedByRef |
If true, we will not serialize ClassGeneratedBy reference in UClass.
| uint8 FArchiveState::ArIgnoreClassRef |
If true, UObject::Serialize will skip serialization of the Class property.
| uint8 FArchiveState::ArIgnoreOuterRef |
If true, we will not serialize the Outer reference in UObject.
| uint8 FArchiveState::ArIsCountingMemory |
Whether this archive is counting memory.
| uint8 FArchiveState::ArIsFilterEditorOnly |
Whether editor only properties are being filtered from the archive (or has been filtered).
|
protected |
Whether this archive is for loading data.
|
protected |
Whether this archive is loading from a cooked package.
| uint8 FArchiveState::ArIsModifyingWeakAndStrongReferences |
Whether a reference collector is modifying the references and wants both weak and strong ones
| uint8 FArchiveState::ArIsNetArchive |
Whether or not this archive is sending/receiving network data
| uint8 FArchiveState::ArIsObjectReferenceCollector |
Whether this archive only cares about serializing object references.
|
protected |
Whether this archive saves to persistent storage. This is also true for some intermediate archives like DuplicateObject that are expected to go to persistent storage but may be discarded
| uint8 FArchiveState::ArIsSaveGame |
Whether this archive is saving/loading game state
|
protected |
Whether this archive is for saving data.
| uint8 FArchiveState::ArIsSavingOptionalObject |
Whether we are currently serializing optional data
|
protected |
Whether this archive serializes to a text format. Text format archives should use high level constructs from FStructuredArchive for delimiting data rather than manually seeking through the file.
|
protected |
Whether archive is transacting, which is used to keep track of changes to objects for things like the editor undo system.
|
protected |
Holds the archive version for licensees.
| int64 FArchiveState::ArMaxSerializeSize |
Max size of data that this archive is allowed to serialize.
| uint8 FArchiveState::ArMergeOverrides |
Set to false if OverriddenProperties should be cleared at the beginning of SerializeVersionedTaggedProperties.
| uint8 FArchiveState::ArNoDelta |
If true, do not perform delta serialization of properties.
| uint8 FArchiveState::ArNoIntraPropertyDelta |
If true, do not perform delta serialization within properties (e.g. TMaps and TSets).
| uint32 FArchiveState::ArPortFlags |
Modifier flags that be used when serializing UProperties
| uint8 FArchiveState::ArPreserveArrayElements |
Set TRUE to stop arrays from being cleared before they're loaded. Instead, array data will be merged
| int32 FArchiveState::ArSerializingDefaults |
Whether we are currently serializing defaults. > 0 means yes, <= 0 means no.
| uint8 FArchiveState::ArShouldSkipBulkData |
Whether bulk data serialization should be skipped or not.
|
protected |
Holds the archive version.
| uint8 FArchiveState::ArUseCustomPropertyList |
Set TRUE to use the custom property list attribute for serialization.
|
protected |
Whether tagged property serialization is replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.
|
protected |
Whether this archive wants properties to be serialized in binary form instead of tagged.
|
mutableprotected |
Indicates if the custom versions container is in a 'reset' state. This will be used to defer the choice about how to populate the container until it is needed, where the read/write state will be known.
|
mutableprotected |
All the custom versions stored in the archive. Stored as a pointer to a heap-allocated object because of a 3-way dependency between TArray, FCustomVersionContainer and FArchive, which is too much work to change right now. Keeping it as a heap-allocated object also helps with performance in some cases as we don't need to construct it for archives that don't care about custom versions.
| FFastPathLoadBuffer FArchiveState::InlineFPLB |
|
protected |
Provider of data and API specific to UPackage::Save2. Required by archives used from UPackage::Save2, and required for cook saves of packages. nullptr means the archive is not one from UPackage::Save2 and is not being called from a cook save.
|
protected |
Holds the pointer to the property that is currently being serialized
|
protected |
Holds the chain of properties that are currently being serialized