![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ObjectSaveContext.h>
Public Member Functions | |
| COREUOBJECT_API | FObjectSaveContextData () |
| COREUOBJECT_API | ~FObjectSaveContextData () |
| COREUOBJECT_API | FObjectSaveContextData (const FObjectSaveContextData &Other) |
| COREUOBJECT_API | FObjectSaveContextData (FObjectSaveContextData &&Other) |
| COREUOBJECT_API | FObjectSaveContextData (UPackage *Package, const ITargetPlatform *InTargetPlatform, const TCHAR *InTargetFilename, uint32 InSaveFlags) |
| COREUOBJECT_API | FObjectSaveContextData (UPackage *Package, const ITargetPlatform *InTargetPlatform, const FPackagePath &TargetPath, uint32 InSaveFlags) |
| COREUOBJECT_API void | Set (UPackage *Package, const ITargetPlatform *InTargetPlatform, const TCHAR *InTargetFilename, uint32 InSaveFlags) |
| COREUOBJECT_API void | Set (UPackage *Package, const ITargetPlatform *InTargetPlatform, const FPackagePath &TargetPath, uint32 InSaveFlags) |
| void | AddSaveOverride (UObject *Target, FObjectSaveOverride InOverride) |
Public Attributes | |
| FString | TargetFilename |
| const ITargetPlatform * | TargetPlatform = nullptr |
| UE::Cook::ICookInfo * | CookInfo = nullptr |
| IPackageWriter * | PackageWriter = nullptr |
| UObject * | Object = nullptr |
| uint32 | SaveFlags = 0 |
| uint32 | OriginalPackageFlags = 0 |
| UE::Cook::ECookType | CookType = UE::Cook::ECookType::Unknown |
| UE::Cook::ECookingDLC | CookingDLC = UE::Cook::ECookingDLC::Unknown |
| EObjectSaveContextPhase | ObjectSaveContextPhase = EObjectSaveContextPhase::Invalid |
| bool | bProceduralSave = false |
| bool | bUpdatingLoadedPath = false |
| bool | bOuterConcurrentSave = true |
| bool | bSaveSucceeded = true |
| bool | bDeterminismDebug = false |
| TMap< UObject *, FObjectSaveOverride > | SaveOverrides |
| bool | bCleanupRequired = false |
| int32 | NumRefPasses = 0 |
| bool | bBaseClassCalled = false |
| bool | bRequestPostSaveSerialization = false |
Data used to provide information about the save parameters during PreSave/PostSave.
|
default |
|
default |
|
default |
|
default |
| PRAGMA_ENABLE_DEPRECATION_WARNINGS FObjectSaveContextData::FObjectSaveContextData | ( | UPackage * | Package, |
| const ITargetPlatform * | InTargetPlatform, | ||
| const TCHAR * | InTargetFilename, | ||
| uint32 | InSaveFlags | ||
| ) |
Standard constructor; calculates derived fields from the given externally-specified fields.
| FObjectSaveContextData::FObjectSaveContextData | ( | UPackage * | Package, |
| const ITargetPlatform * | InTargetPlatform, | ||
| const FPackagePath & | TargetPath, | ||
| uint32 | InSaveFlags | ||
| ) |
|
inline |
Add a save override to specific object. (i.e. mark certain objects or properties transient for this save)
| void FObjectSaveContextData::Set | ( | UPackage * | Package, |
| const ITargetPlatform * | InTargetPlatform, | ||
| const FPackagePath & | TargetPath, | ||
| uint32 | InSaveFlags | ||
| ) |
| void FObjectSaveContextData::Set | ( | UPackage * | Package, |
| const ITargetPlatform * | InTargetPlatform, | ||
| const TCHAR * | InTargetFilename, | ||
| uint32 | InSaveFlags | ||
| ) |
Set the fields set by the standard constructor.
Call-site enforcement; records whether the base PreSave was called.
A bool that can be set from PreSave to indicate PostSave needs to take some extra cleanup steps.
Applicable only to cook saves: True if the SavePackage call should write extra debug data for debugging cook determinism or incremental cook issues.
Always true normally. When a system is executing multiple PreSaves/PostSaves concurrently before a single save, all but the first PreSaves have this set to false. If there are PostSaves they are executed in reverse order, and all but the last PostSave have this set to false.
Set to true when the package is being saved due to a procedural save. Any save without the possibility of user-generated edits to the package is a procedural save (Cooking, EditorDomain). This allows us to execute transforms that only need to be executed in response to new user data.
Set to true when the current object being serialized needs to call serialize again in PostSave phase.
Set to false if the save failed, before calling any PostSaves.
Set to true when the LoadedPath of the package being saved is being updated. This allows us to update the in-memory package when it is saved in editor to match its new save file.
| UE::Cook::ICookInfo* FObjectSaveContextData::CookInfo = nullptr |
The CookInfo providing extended information about the current cook. Null if not cooking.
| UE::Cook::ECookingDLC FObjectSaveContextData::CookingDLC = UE::Cook::ECookingDLC::Unknown |
| UE::Cook::ECookType FObjectSaveContextData::CookType = UE::Cook::ECookType::Unknown |
| int32 FObjectSaveContextData::NumRefPasses = 0 |
PreSave contract enforcement; records whether PreSave is overridden.
| UObject* FObjectSaveContextData::Object = nullptr |
The object the Save event is being called on, if known.
| EObjectSaveContextPhase FObjectSaveContextData::ObjectSaveContextPhase = EObjectSaveContextPhase::Invalid |
Set to the appropriate phase when calling Serialize during SavePackage.
| uint32 FObjectSaveContextData::OriginalPackageFlags = 0 |
Package->GetPackageFlags before the save, or 0 if no package.
| IPackageWriter* FObjectSaveContextData::PackageWriter = nullptr |
The PackageWriter passed to SavePackage, may be null.
| uint32 FObjectSaveContextData::SaveFlags = 0 |
The save flags (ESaveFlags) of the save.
| TMap<UObject*, FObjectSaveOverride> FObjectSaveContextData::SaveOverrides |
List of property overrides per object to apply to during save
| FString FObjectSaveContextData::TargetFilename |
The target Filename being saved into (not the temporary file for saving). The path is in the standard UnrealEngine form - it is as a relative path from the process binary directory. Set to the empty string if the saved bytes are not being saved to a file.
| const ITargetPlatform* FObjectSaveContextData::TargetPlatform = nullptr |
The target platform of the save, if cooking. Null if not cooking.