UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FArchiveState Struct Referenceabstract

#include <Archive.h>

+ Inheritance diagram for FArchiveState:

Classes

struct  FFastPathLoadBuffer
 

Public Member Functions

virtual FArchiveStateGetInnermostState ()
 
CORE_API void SetArchiveState (const FArchiveState &InState)
 
CORE_API void SetError ()
 
CORE_API void ClearError ()
 
CORE_API void SetCriticalError ()
 
virtual void CountBytes (SIZE_T InNum, SIZE_T InMax)
 
virtual CORE_API FString GetArchiveName () const
 
virtual FLinkerGetLinker ()
 
virtual int64 Tell ()
 
virtual int64 TotalSize ()
 
virtual bool AtEnd ()
 
bool IsByteSwapping ()
 
void ThisContainsCode ()
 
void ThisContainsMap ()
 
CORE_API void ThisRequiresLocalizationGather ()
 
virtual UObjectGetArchetypeFromLoader (const UObject *Obj)
 
UE_FORCEINLINE_HINT FPackageFileVersion UEVer () const
 
UE_FORCEINLINE_HINT int32 LicenseeUEVer () const
 
UE_FORCEINLINE_HINT FEngineVersionBase EngineVer () const
 
virtual CORE_API uint32 EngineNetVer () const
 
virtual CORE_API uint32 GameNetVer () const
 
CORE_API int32 CustomVer (const struct FGuid &Key) const
 
UE_FORCEINLINE_HINT bool IsLoading () const
 
UE_FORCEINLINE_HINT bool IsLoadingFromCookedPackage () const
 
UE_FORCEINLINE_HINT bool IsSaving () const
 
bool IsTransacting () const
 
UE_FORCEINLINE_HINT bool IsTextFormat () const
 
UE_FORCEINLINE_HINT bool WantBinaryPropertySerialization () const
 
UE_FORCEINLINE_HINT bool UseUnversionedPropertySerialization () const
 
UE_FORCEINLINE_HINT bool IsForcingUnicode () const
 
UE_FORCEINLINE_HINT bool IsPersistent () const
 
void SetShouldSkipCompilingAssets (bool Enabled)
 
UE_FORCEINLINE_HINT bool ShouldSkipCompilingAssets () const
 
CORE_API void SetShouldSkipUpdateCustomVersion (bool bShouldSkip)
 
UE_FORCEINLINE_HINT bool ShouldSkipUpdateCustomVersion () const
 
CORE_API void SetMigratingRemoteObjects (bool bMigrating)
 
virtual const FUObjectMigrationContextGetMigrationContext () const
 
UE_FORCEINLINE_HINT constexpr bool IsMigratingRemoteObjects () const
 
UE_FORCEINLINE_HINT bool IsError () const
 
UE_FORCEINLINE_HINT bool GetError () const
 
UE_FORCEINLINE_HINT bool IsCriticalError () const
 
UE_FORCEINLINE_HINT bool ContainsCode () const
 
UE_FORCEINLINE_HINT bool ContainsMap () const
 
bool RequiresLocalizationGather () const
 
UE_FORCEINLINE_HINT bool ForceByteSwapping () const
 
UE_FORCEINLINE_HINT bool IsSerializingDefaults () const
 
UE_FORCEINLINE_HINT bool IsIgnoringArchetypeRef () const
 
UE_FORCEINLINE_HINT bool DoDelta () const
 
UE_FORCEINLINE_HINT bool DoIntraPropertyDelta () const
 
UE_FORCEINLINE_HINT bool IsIgnoringOuterRef () const
 
UE_FORCEINLINE_HINT bool IsIgnoringClassGeneratedByRef () const
 
UE_FORCEINLINE_HINT bool IsIgnoringClassRef () const
 
UE_FORCEINLINE_HINT bool IsAllowingLazyLoading () const
 
UE_FORCEINLINE_HINT bool IsObjectReferenceCollector () const
 
UE_FORCEINLINE_HINT bool IsModifyingWeakAndStrongReferences () const
 
UE_FORCEINLINE_HINT bool IsCountingMemory () const
 
UE_FORCEINLINE_HINT uint32 GetPortFlags () const
 
UE_FORCEINLINE_HINT bool HasAnyPortFlags (uint32 Flags) const
 
UE_FORCEINLINE_HINT bool HasAllPortFlags (uint32 Flags) const
 
uint32 GetDebugSerializationFlags () const
 
UE_FORCEINLINE_HINT bool ShouldSkipBulkData () const
 
UE_FORCEINLINE_HINT int64 GetMaxSerializeSize () const
 
virtual CORE_API const FCustomVersionContainerGetCustomVersions () const
 
virtual CORE_API void SetCustomVersions (const FCustomVersionContainer &CustomVersionContainer)
 
virtual CORE_API void ResetCustomVersions ()
 
CORE_API void SetCustomVersion (const struct FGuid &Key, int32 Version, FName FriendlyName)
 
void SetByteSwapping (bool Enabled)
 
void SetPortFlags (uint32 InPortFlags)
 
virtual void SetDebugSerializationFlags (uint32 InCustomFlags)
 
bool IsFilterEditorOnly () const
 
virtual void SetFilterEditorOnly (bool InFilterEditorOnly)
 
bool IsSavingOptionalObject () const
 
virtual void SetSavingOptionalObject (bool InSavingOptionalObject)
 
bool IsSaveGame () const
 
UE_FORCEINLINE_HINT bool IsNetArchive () const
 
UE_FORCEINLINE_HINT bool IsCooking () const
 
void SetSavePackageData (FArchiveSavePackageData *InSavePackageData)
 
FArchiveSavePackageDataGetSavePackageData ()
 
void SetCookData (FArchiveCookData *InCookData)
 
FArchiveCookDataGetCookData ()
 
UE_FORCEINLINE_HINT FArchiveCookContextGetCookContext ()
 
UE_FORCEINLINE_HINT const ITargetPlatformCookingTarget () const
 
FObjectSavePackageSerializeContextGetSavePackageSerializeContext ()
 
virtual bool UseToResolveEnumerators () const
 
virtual bool ShouldSkipProperty (const FProperty *InProperty) const
 
virtual void SetSerializedProperty (FProperty *InProperty)
 
UE_FORCEINLINE_HINT class FPropertyGetSerializedProperty () const
 
CORE_API void GetSerializedPropertyChain (TArray< class FProperty * > &OutProperties) const
 
UE_FORCEINLINE_HINT const FArchiveSerializedPropertyChainGetSerializedPropertyChain () const
 
virtual CORE_API void SetSerializedPropertyChain (const FArchiveSerializedPropertyChain *InSerializedPropertyChain, class FProperty *InSerializedPropertyOverride=nullptr)
 
virtual void SetSerializeContext (FUObjectSerializeContext *InLoadContext)
 
 UE_DEPRECATED (5.5, "GetSerializeContext is not supported. Use FUObjectThreadContext::Get().GetSerializeContext().") virtual FUObjectSerializeContext *GetSerializeContext()
 
virtual CORE_API void Reset ()
 
virtual CORE_API void SetIsLoading (bool bInIsLoading)
 
virtual CORE_API void SetIsLoadingFromCookedPackage (bool bInIsLoadingFromCookedPackage)
 
virtual CORE_API void SetIsSaving (bool bInIsSaving)
 
virtual CORE_API void SetIsTransacting (bool bInIsTransacting)
 
virtual CORE_API void SetIsTextFormat (bool bInIsTextFormat)
 
virtual CORE_API void SetWantBinaryPropertySerialization (bool bInWantBinaryPropertySerialization)
 
virtual CORE_API void SetUseUnversionedPropertySerialization (bool bInUseUnversioned)
 
virtual CORE_API void SetForceUnicode (bool bInForceUnicode)
 
virtual CORE_API void SetIsPersistent (bool bInIsPersistent)
 
virtual CORE_API void SetUEVer (FPackageFileVersion InVer)
 
virtual CORE_API void SetLicenseeUEVer (int32 InVer)
 
virtual CORE_API void SetEngineVer (const FEngineVersionBase &InVer)
 
virtual CORE_API void SetEngineNetVer (const uint32 InEngineNetVer)
 
virtual CORE_API void SetGameNetVer (const uint32 InGameNetVer)
 
template<typename T >
FORCEINLINE void ForEachState (T Func)
 

Public Attributes

FFastPathLoadBufferActiveFPLB
 
FFastPathLoadBuffer InlineFPLB
 
uint8 ArContainsCode: 1
 
uint8 ArContainsMap: 1
 
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 ArForceByteSwapping: 1
 
uint8 ArIgnoreArchetypeRef: 1
 
uint8 ArNoDelta: 1
 
uint8 ArNoIntraPropertyDelta: 1
 
uint8 ArIgnoreOuterRef: 1
 
uint8 ArIgnoreClassGeneratedByRef: 1
 
uint8 ArIgnoreClassRef: 1
 
uint8 ArAllowLazyLoading: 1
 
uint8 ArIsObjectReferenceCollector: 1
 
uint8 ArIsModifyingWeakAndStrongReferences: 1
 
uint8 ArIsCountingMemory: 1
 
uint8 ArShouldSkipBulkData: 1
 
uint8 ArIsFilterEditorOnly: 1
 
uint8 ArIsSavingOptionalObject: 1
 
uint8 ArIsSaveGame: 1
 
uint8 ArIsNetArchive: 1
 
uint8 ArUseCustomPropertyList: 1
 
uint8 ArMergeOverrides: 1
 
uint8 ArPreserveArrayElements: 1
 
int32 ArSerializingDefaults
 
uint32 ArPortFlags
 
int64 ArMaxSerializeSize
 
const struct FCustomPropertyListNodeArCustomPropertyList
 

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)
 

Protected Attributes

uint8 ArIsLoading: 1
 
uint8 ArIsLoadingFromCookedPackage: 1
 
uint8 ArIsSaving: 1
 
uint8 ArIsTransacting: 1
 
uint8 ArIsTextFormat: 1
 
uint8 ArWantBinaryPropertySerialization: 1
 
uint8 ArUseUnversionedPropertySerialization: 1
 
uint8 ArForceUnicode: 1
 
uint8 ArIsPersistent: 1
 
FPackageFileVersion ArUEVer
 
int32 ArLicenseeUEVer
 
FEngineVersionBase ArEngineVer
 
FCustomVersionContainerCustomVersionContainer = nullptr
 
FArchiveSavePackageDataSavePackageData = nullptr
 
FPropertySerializedProperty
 
FArchiveSerializedPropertyChainSerializedPropertyChain
 
bool bCustomVersionsAreReset
 

Friends

class FArchive
 

Member Function Documentation

◆ AtEnd()

virtual bool FArchiveState::AtEnd ( )
inlinevirtual

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.

◆ ClearError()

void FArchiveState::ClearError ( )

Sets ArIsError to false, this does not clear any CriticalErrors

◆ ContainsCode()

UE_FORCEINLINE_HINT bool FArchiveState::ContainsCode ( ) const
inline

Returns true if this archive contains native or generated code.

◆ ContainsMap()

UE_FORCEINLINE_HINT bool FArchiveState::ContainsMap ( ) const
inline

Returns true if this archive contains a ULevel or UWorld object.

◆ CookingTarget()

UE_FORCEINLINE_HINT const ITargetPlatform * FArchiveState::CookingTarget ( ) const
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.

Returns
Target platform.

◆ CopyTrivialFArchiveStatusMembers()

void FArchiveState::CopyTrivialFArchiveStatusMembers ( const FArchiveState ArchiveStatusToCopy)
protected

Copies all of the members except CustomVersionContainer

◆ CountBytes()

virtual void FArchiveState::CountBytes ( SIZE_T  InNum,
SIZE_T  InMax 
)
inlinevirtual

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.

◆ CustomVer()

int32 FArchiveState::CustomVer ( const struct FGuid Key) const

Queries a custom version from the archive. If the archive is being used to write, the custom version must have already been registered.

Parameters
KeyThe guid of the custom version to query.
Returns
The version number, or -1 if the custom tag isn't stored in the archive.

◆ DoDelta()

UE_FORCEINLINE_HINT bool FArchiveState::DoDelta ( ) const
inline

Returns true if this archive should handle delta serialization for properties.

◆ DoIntraPropertyDelta()

UE_FORCEINLINE_HINT bool FArchiveState::DoIntraPropertyDelta ( ) const
inline

Returns true if this archive should perform delta serialization within properties (e.g. TMaps and TSets).

◆ EngineNetVer()

uint32 FArchiveState::EngineNetVer ( ) const
virtual

Returns the engine-global network protocol version for this archive.

Reimplemented in FArchive, and FInBunch.

◆ EngineVer()

UE_FORCEINLINE_HINT FEngineVersionBase FArchiveState::EngineVer ( ) const
inline

Returns the compiled engine version used for this archive.

◆ ForceByteSwapping()

UE_FORCEINLINE_HINT bool FArchiveState::ForceByteSwapping ( ) const
inline

Returns true if this archive should always swap bytes, ignoring endian rules.

◆ ForEachState()

template<typename T >
FORCEINLINE void FArchiveState::ForEachState ( Func)

◆ GameNetVer()

uint32 FArchiveState::GameNetVer ( ) const
virtual

Returns the game-specific network protocol version for this archive.

Reimplemented in FArchive, and FInBunch.

◆ GetArchetypeFromLoader()

virtual UObject * FArchiveState::GetArchetypeFromLoader ( const UObject Obj)
inlinevirtual

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.

◆ GetArchiveName()

FString FArchiveState::GetArchiveName ( ) const
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.

◆ GetCookContext()

UE_FORCEINLINE_HINT FArchiveCookContext * FArchiveState::GetCookContext ( )
inline

◆ GetCookData()

FArchiveCookData * FArchiveState::GetCookData ( )
inline

◆ GetCustomVersions()

const FCustomVersionContainer & FArchiveState::GetCustomVersions ( ) const
virtual

Gets the custom version numbers for this archive. These are used to check for system or game-specific version numbers.

Returns
The container of custom versions in the archive.

Reimplemented in FArchive, FNameTableArchiveReader, FArchiveProxy, and FMaterialResourceMemoryWriter.

◆ GetDebugSerializationFlags()

uint32 FArchiveState::GetDebugSerializationFlags ( ) const
inline

Returns the editor-only debug serialization flags.

◆ GetError()

UE_FORCEINLINE_HINT bool FArchiveState::GetError ( ) const
inline

◆ GetInnermostState()

virtual FArchiveState & FArchiveState::GetInnermostState ( )
inlinevirtual

Returns lowest level archive state, proxy archives will override this.

Reimplemented in FArchive, and FArchiveProxy.

◆ GetLinker()

virtual FLinker * FArchiveState::GetLinker ( )
inlinevirtual

If this archive is a FLinkerLoad or FLinkerSave, returns a pointer to the ULinker portion.

Returns
The linker, or nullptr if the archive is not a linker.

Reimplemented in FArchive, FLinkerSave, FArchiveProxy, and FLinkerLoad.

◆ GetMaxSerializeSize()

UE_FORCEINLINE_HINT int64 FArchiveState::GetMaxSerializeSize ( ) const
inline

Returns the maximum size of data that this archive is allowed to serialize.

◆ GetMigrationContext()

virtual const FUObjectMigrationContext * FArchiveState::GetMigrationContext ( ) const
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 >.

◆ GetPortFlags()

UE_FORCEINLINE_HINT uint32 FArchiveState::GetPortFlags ( ) const
inline

Returns this archive's property serialization modifier flags.

◆ GetSavePackageData()

FArchiveSavePackageData * FArchiveState::GetSavePackageData ( )
inline

◆ GetSavePackageSerializeContext()

FObjectSavePackageSerializeContext * FArchiveState::GetSavePackageSerializeContext ( )
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.

◆ GetSerializedProperty()

UE_FORCEINLINE_HINT class FProperty * FArchiveState::GetSerializedProperty ( ) const
inline

Gets the property that is currently being serialized

Returns
Pointer to the property that is currently being serialized

◆ GetSerializedPropertyChain() [1/2]

UE_FORCEINLINE_HINT const FArchiveSerializedPropertyChain * FArchiveState::GetSerializedPropertyChain ( ) const
inline

Get the raw serialized property chain for this archive

Note
Accessing this directly can avoid an array allocation depending on your use-case

◆ GetSerializedPropertyChain() [2/2]

void FArchiveState::GetSerializedPropertyChain ( TArray< class FProperty * > &  OutProperties) const

Gets the chain of properties that are currently being serialized

Note
This populates the array in stack order, so the 0th entry in the array is the top of the stack of properties

◆ HasAllPortFlags()

UE_FORCEINLINE_HINT bool FArchiveState::HasAllPortFlags ( uint32  Flags) const
inline

Checks to see if all of the passed in property serialization modifier flags are set.

◆ HasAnyPortFlags()

UE_FORCEINLINE_HINT bool FArchiveState::HasAnyPortFlags ( uint32  Flags) const
inline

Checks to see if any of the passed in property serialization modifier flags are set.

◆ IsAllowingLazyLoading()

UE_FORCEINLINE_HINT bool FArchiveState::IsAllowingLazyLoading ( ) const
inline

Returns true if this archive sould allow lazy loading of bulk / secondary data.

◆ IsByteSwapping()

bool FArchiveState::IsByteSwapping ( )
inline

Returns true if data larger than 1 byte should be swapped to deal with endian mismatches.

◆ IsCooking()

UE_FORCEINLINE_HINT bool FArchiveState::IsCooking ( ) const
inline

Checks whether the archive is used for cooking.

Returns
true if the archive is used for cooking, false otherwise.

◆ IsCountingMemory()

UE_FORCEINLINE_HINT bool FArchiveState::IsCountingMemory ( ) const
inline

Returns true if this archive is counting memory, normally CountBytes is called to get the size.

◆ IsCriticalError()

UE_FORCEINLINE_HINT bool FArchiveState::IsCriticalError ( ) const
inline

Returns true if this archive contains critical errors that cannot be recovered from.

◆ IsError()

UE_FORCEINLINE_HINT bool FArchiveState::IsError ( ) const
inline

Returns true if this archive contains errors, which means that further serialization is generally not safe.

◆ IsFilterEditorOnly()

bool FArchiveState::IsFilterEditorOnly ( ) const
inline

Indicates whether this archive is filtering editor-only on save or contains data that had editor-only content stripped.

Returns
true if the archive filters editor-only content, false otherwise.

◆ IsForcingUnicode()

UE_FORCEINLINE_HINT bool FArchiveState::IsForcingUnicode ( ) const
inline

Returns true if this archive wants to always save strings in UTF16 format even if they are ANSI characters.

◆ IsIgnoringArchetypeRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringArchetypeRef ( ) const
inline

Returns true if this archive should ignore archetype references for structs and classes.

◆ IsIgnoringClassGeneratedByRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringClassGeneratedByRef ( ) const
inline

Returns true if this archive should ignore the ClassGeneratedBy reference in UClass.

◆ IsIgnoringClassRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringClassRef ( ) const
inline

Returns true if this archive should ignore the Class reference in UObject.

◆ IsIgnoringOuterRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringOuterRef ( ) const
inline

Returns true if this archive should ignore the Outer reference in UObject.

◆ IsLoading()

UE_FORCEINLINE_HINT bool FArchiveState::IsLoading ( ) const
inline

Returns true if this archive is for loading data.

◆ IsLoadingFromCookedPackage()

UE_FORCEINLINE_HINT bool FArchiveState::IsLoadingFromCookedPackage ( ) const
inline

Returns true if this archive is loading from a cooked package.

◆ IsMigratingRemoteObjects()

UE_FORCEINLINE_HINT constexpr bool FArchiveState::IsMigratingRemoteObjects ( ) const
inlineconstexpr

Returns true if this Archive is migrating remote object

◆ IsModifyingWeakAndStrongReferences()

UE_FORCEINLINE_HINT bool FArchiveState::IsModifyingWeakAndStrongReferences ( ) const
inline

Returns true if this archive should modify/search weak object references as well as strong ones.

◆ IsNetArchive()

UE_FORCEINLINE_HINT bool FArchiveState::IsNetArchive ( ) const
inline

Whether or not this archive is serializing data being sent/received by the netcode

◆ IsObjectReferenceCollector()

UE_FORCEINLINE_HINT bool FArchiveState::IsObjectReferenceCollector ( ) const
inline

Returns true if this archive is only looking for UObject references. This can be false for reference collectors looking for more general references.

◆ IsPersistent()

UE_FORCEINLINE_HINT bool FArchiveState::IsPersistent ( ) const
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.

◆ IsSaveGame()

bool FArchiveState::IsSaveGame ( ) const
inline

Indicates whether this archive is saving or loading game state

Note
This is intended for game-specific archives and is not true for any of the build in save methods
Returns
true if the archive is dealing with save games, false otherwise.

◆ IsSaving()

UE_FORCEINLINE_HINT bool FArchiveState::IsSaving ( ) const
inline

Returns true if this archive is for saving data, this can also be a pre-save preparation archive.

◆ IsSavingOptionalObject()

bool FArchiveState::IsSavingOptionalObject ( ) const
inline

Indicates when the archive is serializing an Optional object. Will only return true when Ar.IsSaving() is also true

See also
EClassFlags::CLASS_Optional
Returns
true if currently saving optional data

◆ IsSerializingDefaults()

UE_FORCEINLINE_HINT bool FArchiveState::IsSerializingDefaults ( ) const
inline

Returns true if this archive is currently serializing class/struct default values.

◆ IsTextFormat()

UE_FORCEINLINE_HINT bool FArchiveState::IsTextFormat ( ) const
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.

◆ IsTransacting()

bool FArchiveState::IsTransacting ( ) const
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.

◆ LicenseeUEVer()

UE_FORCEINLINE_HINT int32 FArchiveState::LicenseeUEVer ( ) const
inline

Returns the licensee-specific version used for this archive, will be 0 by default.

◆ LinkProxy()

void FArchiveState::LinkProxy ( FArchiveState Inner,
FArchiveState Proxy 
)
staticprotected

◆ RequiresLocalizationGather()

bool FArchiveState::RequiresLocalizationGather ( ) const
inline

Returns true if this archive contains data required to be gathered for localization.

◆ Reset()

void FArchiveState::Reset ( void  )
virtual

Resets all of the base archive members.

Reimplemented in FArchive, FLocalFileStreamFArchive, FArchiveMD5, FBitWriter, FArchiveCrc32, and FOutBunch.

◆ ResetCustomVersions()

void FArchiveState::ResetCustomVersions ( )
virtual

Resets the custom version numbers for this archive.

Reimplemented in FArchive, FNameTableArchiveReader, and FArchiveProxy.

◆ SetArchiveState()

void FArchiveState::SetArchiveState ( const FArchiveState InState)

Modifies current archive state, can be used to override flags.

◆ SetByteSwapping()

void FArchiveState::SetByteSwapping ( bool  Enabled)
inline

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.

Parameters
Enabledset to true to enable byte order swapping

◆ SetCookData()

void FArchiveState::SetCookData ( FArchiveCookData InCookData)
inline

◆ SetCriticalError()

void FArchiveState::SetCriticalError ( )

Sets the archiver IsCriticalError and IsError to true. Also sets CriticalError in the proxy archiver if one is wrapping this.

◆ SetCustomVersion()

void FArchiveState::SetCustomVersion ( const struct FGuid Key,
int32  Version,
FName  FriendlyName 
)

Sets a specific custom version

Parameters
Key- The guid of the custom version to query.
Version- The version number to set key to
FriendlyName- Friendly name corresponding to the key

◆ SetCustomVersions()

void FArchiveState::SetCustomVersions ( const FCustomVersionContainer CustomVersionContainer)
virtual

Sets the custom version numbers for this archive.

Parameters
CustomVersionContainer- The container of custom versions to copy into the archive.

Reimplemented in FArchive, FNameTableArchiveReader, and FArchiveProxy.

◆ SetDebugSerializationFlags()

virtual void FArchiveState::SetDebugSerializationFlags ( uint32  InCustomFlags)
inlinevirtual

Sets the archives custom serialization modifier flags (nothing to do with PortFlags or Custom versions)

Parameters
InCustomFlagsthe new flags to use for custom serialization

Reimplemented in FArchive, FArchiveProxy, and FLinkerSave.

◆ SetEngineNetVer()

void FArchiveState::SetEngineNetVer ( const uint32  InEngineNetVer)
virtual

Sets the archive engine network version.

Reimplemented in FArchive, and FInBunch.

◆ SetEngineVer()

void FArchiveState::SetEngineVer ( const FEngineVersionBase InVer)
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.

Parameters
InVernew version number

Reimplemented in FArchive.

◆ SetError()

void FArchiveState::SetError ( )

Sets ArIsError to true. Also sets error in the proxy archiver if one is wrapping this.

◆ SetFilterEditorOnly()

virtual void FArchiveState::SetFilterEditorOnly ( bool  InFilterEditorOnly)
inlinevirtual

Sets a flag indicating that this archive needs to filter editor-only content.

Parameters
InFilterEditorOnlyWhether to filter editor-only content.

Reimplemented in FLinkerSave, FArchive, and FArchiveProxy.

◆ SetForceUnicode()

void FArchiveState::SetForceUnicode ( bool  bInForceUnicode)
virtual

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.

Parameters
bInForceUnicodetrue if this archive wants to force saving as Unicode, false otherwise.

Reimplemented in FArchive.

◆ SetGameNetVer()

void FArchiveState::SetGameNetVer ( const uint32  InGameNetVer)
virtual

Sets the archive game network version.

Reimplemented in FArchive, and FInBunch.

◆ SetIsLoading()

void FArchiveState::SetIsLoading ( bool  bInIsLoading)
virtual

Sets whether this archive is for loading data.

Parameters
bInIsLoadingtrue if this archive is for loading, false otherwise.

Reimplemented in FArchive.

◆ SetIsLoadingFromCookedPackage()

void FArchiveState::SetIsLoadingFromCookedPackage ( bool  bInIsLoadingFromCookedPackage)
virtual

Sets whether the archive is loading from a cooked package.

Parameters
bInIsLoadingFromCookedPackagetrue if this archive is loading from a cooked package, false otherwise

Reimplemented in FArchive.

◆ SetIsPersistent()

void FArchiveState::SetIsPersistent ( bool  bInIsPersistent)
virtual

Sets whether this archive is to persistent storage.

Parameters
bInIsPersistenttrue if this archive is to persistent storage, false otherwise.

Reimplemented in FArchive.

◆ SetIsSaving()

void FArchiveState::SetIsSaving ( bool  bInIsSaving)
virtual

Sets whether this archive is for saving data.

Parameters
bInIsSavingtrue if this archive is for saving, false otherwise.

Reimplemented in FArchive.

◆ SetIsTextFormat()

void FArchiveState::SetIsTextFormat ( bool  bInIsTextFormat)
virtual

Sets whether this archive is in text format.

Parameters
bInIsTextFormattrue if this archive is in text format, false otherwise.

Reimplemented in FArchive.

◆ SetIsTransacting()

void FArchiveState::SetIsTransacting ( bool  bInIsTransacting)
virtual

Sets whether this archive is for transacting.

Parameters
bInIsTransactingtrue if this archive is for transacting, false otherwise.

Reimplemented in FArchive.

◆ SetLicenseeUEVer()

void FArchiveState::SetLicenseeUEVer ( int32  InVer)
virtual

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.

Parameters
Vernew version number

Reimplemented in FArchive.

◆ SetMigratingRemoteObjects()

void FArchiveState::SetMigratingRemoteObjects ( bool  bMigrating)

If set true, this archive is migrating remote objects

Parameters
bMigratingWhether this archive is migrating remote objects

◆ SetPortFlags()

void FArchiveState::SetPortFlags ( uint32  InPortFlags)
inline

Sets the archive's property serialization modifier flags

Parameters
InPortFlagsthe new flags to use for property serialization

◆ SetSavePackageData()

void FArchiveState::SetSavePackageData ( FArchiveSavePackageData InSavePackageData)
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.

◆ SetSavingOptionalObject()

virtual void FArchiveState::SetSavingOptionalObject ( bool  InSavingOptionalObject)
inlinevirtual

Set whether or not this archive is current serializing an Optional object

See also
EClassFlags::CLASS_Optional
Parameters
InFilterEditorOnlyWhether to filter editor-only content.

Reimplemented in FArchive.

◆ SetSerializeContext()

virtual void FArchiveState::SetSerializeContext ( FUObjectSerializeContext InLoadContext)
inlinevirtual

Sets the current UObject serialization context for this archive.

Reimplemented in FArchive.

◆ SetSerializedProperty()

virtual void FArchiveState::SetSerializedProperty ( FProperty InProperty)
inlinevirtual

Overrides the property that is currently being serialized

Note
: You likely want to call PushSerializedProperty/PopSerializedProperty instead
Parameters
InPropertyPointer to the property that is currently being serialized

Reimplemented in FArchive, FArchiveProxy, and FLinkerSave.

◆ SetSerializedPropertyChain()

void FArchiveState::SetSerializedPropertyChain ( const FArchiveSerializedPropertyChain InSerializedPropertyChain,
class FProperty InSerializedPropertyOverride = nullptr 
)
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.

◆ SetShouldSkipCompilingAssets()

void FArchiveState::SetShouldSkipCompilingAssets ( bool  Enabled)
inline

Set whether or not it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.

Parameters
EnabledSet to true to enable skip serialization on compiling assets.

◆ SetShouldSkipUpdateCustomVersion()

void FArchiveState::SetShouldSkipUpdateCustomVersion ( bool  bShouldSkip)

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.

Parameters
bShouldSkipWhether we should skip the checking the version registry for new version data if the version key is already set

◆ SetUEVer()

void FArchiveState::SetUEVer ( FPackageFileVersion  InVer)
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.

Parameters
UEVernew version number

Reimplemented in FArchive.

◆ SetUseUnversionedPropertySerialization()

void FArchiveState::SetUseUnversionedPropertySerialization ( bool  bInUseUnversioned)
virtual

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.

◆ SetWantBinaryPropertySerialization()

void FArchiveState::SetWantBinaryPropertySerialization ( bool  bInWantBinaryPropertySerialization)
virtual

Sets whether this archive wants binary property serialization.

Parameters
bInWantBinaryPropertySerializationtrue if this archive wants binary serialization, false otherwise.

Reimplemented in FArchive.

◆ ShouldSkipBulkData()

UE_FORCEINLINE_HINT bool FArchiveState::ShouldSkipBulkData ( ) const
inline

Returns true if this archive should ignore bulk data.

◆ ShouldSkipCompilingAssets()

UE_FORCEINLINE_HINT bool FArchiveState::ShouldSkipCompilingAssets ( ) const
inline

Returns true if it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.

◆ ShouldSkipProperty()

virtual bool FArchiveState::ShouldSkipProperty ( const FProperty InProperty) const
inlinevirtual

◆ ShouldSkipUpdateCustomVersion()

UE_FORCEINLINE_HINT bool FArchiveState::ShouldSkipUpdateCustomVersion ( ) const
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

◆ Tell()

◆ ThisContainsCode()

void FArchiveState::ThisContainsCode ( )
inline

Sets a flag indicating that this archive contains native or generated code.

◆ ThisContainsMap()

void FArchiveState::ThisContainsMap ( )
inline

Sets a flag indicating that this archive contains a ULevel or UWorld object.

◆ ThisRequiresLocalizationGather()

void FArchiveState::ThisRequiresLocalizationGather ( )

Sets a flag indicating that this archive contains data required to be gathered for localization.

◆ TotalSize()

◆ UE_DEPRECATED()

FArchiveState::UE_DEPRECATED ( 5.  5,
"GetSerializeContext is not supported. Use FUObjectThreadContext::Get().GetSerializeContext()."   
)
inline

Gets the current UObject serialization context for this archive.

◆ UEVer()

UE_FORCEINLINE_HINT FPackageFileVersion FArchiveState::UEVer ( ) const
inline

Returns the global engine serialization version used for this archive.

◆ UnlinkProxy()

void FArchiveState::UnlinkProxy ( FArchiveState Inner,
FArchiveState Proxy 
)
staticprotected

◆ UseToResolveEnumerators()

virtual bool FArchiveState::UseToResolveEnumerators ( ) const
inlinevirtual

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

Returns
true if the archive is used to resolve out-of-date enum indexes

Reimplemented in FArchive, and FArchiveProxy.

◆ UseUnversionedPropertySerialization()

UE_FORCEINLINE_HINT bool FArchiveState::UseUnversionedPropertySerialization ( ) const
inline

Returns true if tagged property serialization should be replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.

◆ WantBinaryPropertySerialization()

UE_FORCEINLINE_HINT bool FArchiveState::WantBinaryPropertySerialization ( ) const
inline

Returns true if this archive wants properties to be serialized in binary form instead of safer but slower tagged form.

Friends And Related Symbol Documentation

◆ FArchive

friend class FArchive
friend

Member Data Documentation

◆ ActiveFPLB

FFastPathLoadBuffer* FArchiveState::ActiveFPLB

◆ ArAllowLazyLoading

uint8 FArchiveState::ArAllowLazyLoading

Whether to allow lazy loading of bulk/secondary data.

◆ ArContainsCode

uint8 FArchiveState::ArContainsCode

Quickly tell if an archive contains script code.

◆ ArContainsMap

uint8 FArchiveState::ArContainsMap

Used to determine whether FArchive contains a level or world.

◆ ArCustomPropertyList

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.

◆ ArEngineVer

FEngineVersionBase FArchiveState::ArEngineVer
protected

Holds the engine version.

◆ ArForceByteSwapping

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.

◆ ArForceUnicode

uint8 FArchiveState::ArForceUnicode
protected

Whether this archive wants to always save strings in UTF16 format even if they are ANSI characters

◆ ArIgnoreArchetypeRef

uint8 FArchiveState::ArIgnoreArchetypeRef

If true, we will not serialize archetype references for structs and classes.

◆ ArIgnoreClassGeneratedByRef

uint8 FArchiveState::ArIgnoreClassGeneratedByRef

If true, we will not serialize ClassGeneratedBy reference in UClass.

◆ ArIgnoreClassRef

uint8 FArchiveState::ArIgnoreClassRef

If true, UObject::Serialize will skip serialization of the Class property.

◆ ArIgnoreOuterRef

uint8 FArchiveState::ArIgnoreOuterRef

If true, we will not serialize the Outer reference in UObject.

◆ ArIsCountingMemory

uint8 FArchiveState::ArIsCountingMemory

Whether this archive is counting memory.

◆ ArIsFilterEditorOnly

uint8 FArchiveState::ArIsFilterEditorOnly

Whether editor only properties are being filtered from the archive (or has been filtered).

◆ ArIsLoading

uint8 FArchiveState::ArIsLoading
protected

Whether this archive is for loading data.

◆ ArIsLoadingFromCookedPackage

uint8 FArchiveState::ArIsLoadingFromCookedPackage
protected

Whether this archive is loading from a cooked package.

◆ ArIsModifyingWeakAndStrongReferences

uint8 FArchiveState::ArIsModifyingWeakAndStrongReferences

Whether a reference collector is modifying the references and wants both weak and strong ones

◆ ArIsNetArchive

uint8 FArchiveState::ArIsNetArchive

Whether or not this archive is sending/receiving network data

◆ ArIsObjectReferenceCollector

uint8 FArchiveState::ArIsObjectReferenceCollector

Whether this archive only cares about serializing object references.

◆ ArIsPersistent

uint8 FArchiveState::ArIsPersistent
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

◆ ArIsSaveGame

uint8 FArchiveState::ArIsSaveGame

Whether this archive is saving/loading game state

◆ ArIsSaving

uint8 FArchiveState::ArIsSaving
protected

Whether this archive is for saving data.

◆ ArIsSavingOptionalObject

uint8 FArchiveState::ArIsSavingOptionalObject

Whether we are currently serializing optional data

◆ ArIsTextFormat

uint8 FArchiveState::ArIsTextFormat
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.

◆ ArIsTransacting

uint8 FArchiveState::ArIsTransacting
protected

Whether archive is transacting, which is used to keep track of changes to objects for things like the editor undo system.

◆ ArLicenseeUEVer

int32 FArchiveState::ArLicenseeUEVer
protected

Holds the archive version for licensees.

◆ ArMaxSerializeSize

int64 FArchiveState::ArMaxSerializeSize

Max size of data that this archive is allowed to serialize.

◆ ArMergeOverrides

uint8 FArchiveState::ArMergeOverrides

Set to false if OverriddenProperties should be cleared at the beginning of SerializeVersionedTaggedProperties.

◆ ArNoDelta

uint8 FArchiveState::ArNoDelta

If true, do not perform delta serialization of properties.

◆ ArNoIntraPropertyDelta

uint8 FArchiveState::ArNoIntraPropertyDelta

If true, do not perform delta serialization within properties (e.g. TMaps and TSets).

◆ ArPortFlags

uint32 FArchiveState::ArPortFlags

Modifier flags that be used when serializing UProperties

◆ ArPreserveArrayElements

uint8 FArchiveState::ArPreserveArrayElements

Set TRUE to stop arrays from being cleared before they're loaded. Instead, array data will be merged

◆ ArSerializingDefaults

int32 FArchiveState::ArSerializingDefaults

Whether we are currently serializing defaults. > 0 means yes, <= 0 means no.

◆ ArShouldSkipBulkData

uint8 FArchiveState::ArShouldSkipBulkData

Whether bulk data serialization should be skipped or not.

◆ ArUEVer

FPackageFileVersion FArchiveState::ArUEVer
protected

Holds the archive version.

◆ ArUseCustomPropertyList

uint8 FArchiveState::ArUseCustomPropertyList

Set TRUE to use the custom property list attribute for serialization.

◆ ArUseUnversionedPropertySerialization

uint8 FArchiveState::ArUseUnversionedPropertySerialization
protected

Whether tagged property serialization is replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.

◆ ArWantBinaryPropertySerialization

uint8 FArchiveState::ArWantBinaryPropertySerialization
protected

Whether this archive wants properties to be serialized in binary form instead of tagged.

◆ bCustomVersionsAreReset

bool FArchiveState::bCustomVersionsAreReset
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.

◆ CustomVersionContainer

FCustomVersionContainer* FArchiveState::CustomVersionContainer = nullptr
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.

◆ InlineFPLB

FFastPathLoadBuffer FArchiveState::InlineFPLB

◆ SavePackageData

FArchiveSavePackageData* FArchiveState::SavePackageData = nullptr
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.

◆ SerializedProperty

FProperty* FArchiveState::SerializedProperty
protected

Holds the pointer to the property that is currently being serialized

◆ SerializedPropertyChain

FArchiveSerializedPropertyChain* FArchiveState::SerializedPropertyChain
protected

Holds the chain of properties that are currently being serialized


The documentation for this struct was generated from the following files: