FEditorFileUtils::SaveDirtyContentPackages

Looks at all currently loaded packages and saves them if their "bDirty" flag is set and they include specified clasees, optionally prompting the user to select which packages to save) Still prompts for SaveAs if a package needs a filename

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/FileHelpers.h

Include

#include "FileHelpers.h"

Source

/Engine/Source/Editor/UnrealEd/Private/FileHelpers.cpp

Syntax

static bool SaveDirtyContentPackages
(
    TArray< UClass * > & SaveContentClasses,
    const bool bPromptUserToSave,
    const bool bFastSave,
    const bool bNotifyNoPackagesSaved,
    const bool bCanBeDeclined
)

Remarks

Looks at all currently loaded packages and saves them if their "bDirty" flag is set and they include specified clasees, optionally prompting the user to select which packages to save)

Still prompts for SaveAs if a package needs a filename

Returns

true on success, false on fail.

Parameters

Parameter

Description

SaveContentClasses

save only specified classes or children classes

bPromptUserToSave

true if we should prompt the user to save dirty packages we found. false to assume all dirty packages should be saved. Regardless of this setting the user will be prompted for checkout(if needed) unless bFastSave is set

bFastSave

true if we should do a fast save. (I.E dont prompt the user to save, dont prompt for checkout, and only save packages that are currently writable).

bNotifyNoPackagesSaved

true if a notification should be displayed when no packages need to be saved.

bCanBeDeclined

true if the user prompt should contain a "Don't Save" button in addition to "Cancel", which won't result in a failure return code.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss