FEditorFileUtils::SaveDirtyPackages

Looks at all currently loaded packages and saves them if their "bDirty" flag is set, 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 SaveDirtyPackages
(
    const bool bPromptUserToSave,
    const bool bSaveMapPackages,
    const bool bSaveContentPackages,
    const bool bFastSave,
    const bool bNotifyNoPackagesSaved,
    const bool bCanBeDeclined,
    bool * bOutPackagesNeededSaving
)

Remarks

Looks at all currently loaded packages and saves them if their "bDirty" flag is set, 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

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

bSaveMapPackages

true if map packages should be saved

bSaveContentPackages

true if we should save content packages.

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.

bOutPackagesNeededSaving

when not NULL, will be set to true if there was any work to be done, and false otherwise.

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