UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FObjectPreSaveContext Class Reference

#include <ObjectSaveContext.h>

+ Inheritance diagram for FObjectPreSaveContext:

Public Member Functions

 FObjectPreSaveContext (FObjectSaveContextData &InData)
 
 FObjectPreSaveContext (const FObjectPreSaveContext &Other)
 
const TCHARGetTargetFilename () const
 
bool IsCooking () const
 
const ITargetPlatformGetTargetPlatform () const
 
bool IsCookByTheBook () const
 
bool IsCookOnTheFly () const
 
bool IsCookTypeUnknown () const
 
UE::Cook::ECookType GetCookType () const
 
UE::Cook::ECookingDLC GetCookingDLC () const
 
EObjectSaveContextPhase GetPhase () const
 
bool IsProceduralSave () const
 
bool IsFromAutoSave () const
 
bool IsUpdatingLoadedPath () const
 
uint32 GetSaveFlags () const
 
bool IsFirstConcurrentSave () const
 
void AddSaveOverride (UObject *Target, FObjectSaveOverride InOverride)
 

Protected Attributes

FObjectSaveContextDataData
 

Friends

class UObject
 

Detailed Description

Interface used by PreSave to access the save parameters.

Examples
/work/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

Constructor & Destructor Documentation

◆ FObjectPreSaveContext() [1/2]

FObjectPreSaveContext::FObjectPreSaveContext ( FObjectSaveContextData InData)
inlineexplicit

◆ FObjectPreSaveContext() [2/2]

FObjectPreSaveContext::FObjectPreSaveContext ( const FObjectPreSaveContext Other)
inline

Member Function Documentation

◆ AddSaveOverride()

void FObjectPreSaveContext::AddSaveOverride ( UObject Target,
FObjectSaveOverride  InOverride 
)
inline

Add a save override to specific object. (i.e. mark certain objects or properties transient for this save)

◆ GetCookingDLC()

UE::Cook::ECookingDLC FObjectPreSaveContext::GetCookingDLC ( ) const
inline

◆ GetCookType()

UE::Cook::ECookType FObjectPreSaveContext::GetCookType ( ) const
inline

◆ GetPhase()

EObjectSaveContextPhase FObjectPreSaveContext::GetPhase ( ) const
inline

Return which phase of SavePackage callbacks are active.

See also
EObjectSaveContextPhase.

◆ GetSaveFlags()

uint32 FObjectPreSaveContext::GetSaveFlags ( ) const
inline

Return the save flags (ESaveFlags) of the save.

◆ GetTargetFilename()

const TCHAR * FObjectPreSaveContext::GetTargetFilename ( ) const
inline

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. Empty string if the saved bytes are not being saved to a file. Never null.

◆ GetTargetPlatform()

const ITargetPlatform * FObjectPreSaveContext::GetTargetPlatform ( ) const
inline

Return the targetplatform of the save, if cooking. Null if not cooking.

◆ IsCookByTheBook()

bool FObjectPreSaveContext::IsCookByTheBook ( ) const
inline

◆ IsCooking()

bool FObjectPreSaveContext::IsCooking ( ) const
inline

Report whether this is a save into a target-specific cooked format.

◆ IsCookOnTheFly()

bool FObjectPreSaveContext::IsCookOnTheFly ( ) const
inline

◆ IsCookTypeUnknown()

bool FObjectPreSaveContext::IsCookTypeUnknown ( ) const
inline

◆ IsFirstConcurrentSave()

bool FObjectPreSaveContext::IsFirstConcurrentSave ( ) const
inline

Always true normally. When a system is executing multiple PreSaves concurrently before a single save, will return false for all but the first PreSave.

◆ IsFromAutoSave()

bool FObjectPreSaveContext::IsFromAutoSave ( ) const
inline

Return whether the package is being saved due to the editor auto save feature.

◆ IsProceduralSave()

bool FObjectPreSaveContext::IsProceduralSave ( ) const
inline

Return whether 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.

◆ IsUpdatingLoadedPath()

bool FObjectPreSaveContext::IsUpdatingLoadedPath ( ) const
inline

Return whether 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.

Friends And Related Symbol Documentation

◆ UObject

friend class UObject
friend

Member Data Documentation

◆ Data

FObjectSaveContextData& FObjectPreSaveContext::Data
protected

The documentation for this class was generated from the following file: