![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Containers/Array.h"#include "Containers/Map.h"#include "Containers/UnrealString.h"#include "HAL/Platform.h"#include "Serialization/ArchiveSavePackageData.h"#include "Templates/RefCounting.h"#include "UObject/CookEnums.h"#include "UObject/NameTypes.h"#include "UObject/ObjectSaveOverride.h"Go to the source code of this file.
Classes | |
| struct | FObjectSaveContextData |
| class | FObjectCollectSaveOverridesContext |
| class | FObjectPreSaveContext |
| class | FObjectSavePackageSerializeContext |
| class | FObjectPostSaveContext |
| class | FObjectPreSaveRootContext |
| class | FObjectPostSaveRootContext |
Namespaces | |
| namespace | UE |
| namespace | UE::Cook |
Enumerations | |
| enum class | EObjectSaveContextPhase : uint8 { Invalid , PreSave , Harvest , CookDependencyHarvest , Write , PostSave } |
|
strong |
SavePackage calls PreSave and Serialize hooks on each object, and Serialize is called more than once.
| Enumerator | |
|---|---|
| Invalid | Phase has not been set. This can be returned from GetPhase functions when the serialize calls need to report a cook targetplatform but are not called from SavePackage. |
| PreSave | SavePackage is calling PreSave on objects in the package. Build dependencies are valid for writing during this phase. |
| Harvest | SavePackage is calling Serialize(FArchive&) on objects in the package. The FArchive is an object collector and the save is collecting imports, exports, and names. Build dependencies are valid for writing during this phase. |
| CookDependencyHarvest | The Archive is coming from the cooker, outside of a SavePackage. It is discarding all results other than AddCook*Dependency results. No other save functions (BeginCacheForCookedPlatformData, PreSave, PostSave) have been called or will be called. Objects and structs serializing with this archive should serialize the same structures and UObject pointers that they serialize when serializing Harvest. This phase is executed during cook for packages that are build dependencies but are not cooked themselves. |
| Write | SavePackage is calling Serialize(FArchive&) on objects in the package. The FArchive is recording the blobs of data from each exported UObject that will be written to disk. It is not valid and will cause an error if build dependencies are written during this phase. |
| PostSave | SavePackage is calling PostSaveRoot on objects in the package. |