bPromptForCheckoutOnAssetModification
bPromptForCheckoutOnAssetModification
#Overview
name: bPromptForCheckoutOnAssetModification
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bPromptForCheckoutOnAssetModification is to control whether the Unreal Editor automatically prompts users for source control checkout when an asset is modified. This setting is part of the Editor’s source control integration system.
This setting variable is primarily relied upon by the UnrealEd module, which is a core part of the Unreal Engine editor. Specifically, it’s used in the UnrealEdEngine class, which is responsible for managing many editor-specific functionalities.
The value of this variable is set in the EditorLoadingSavingSettings class, which is a UObject-derived class that stores various editor preferences. It’s defined as a UPROPERTY with the ‘config’ specifier, meaning its value is saved to and loaded from configuration files.
This variable interacts with other source control-related settings, such as bSCCAutoAddNewFiles, which determines whether new files are automatically added to source control.
Developers should be aware that this setting affects the user experience in the editor. When enabled, it can help prevent unintentional modifications to assets without proper source control checkout, which is crucial in team environments. However, it may also lead to more frequent prompts, which some users might find disruptive.
Best practices when using this variable include:
- In team environments, it’s generally recommended to keep this setting enabled to prevent accidental modifications without proper source control management.
- For solo developers or in situations where frequent checkouts are necessary, disabling this might improve workflow efficiency.
- Consider the team’s workflow and source control practices when deciding whether to enable or disable this setting.
- Communicate any changes to this setting to the entire development team to ensure consistent behavior across all team members’ editors.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:187, section: [/Script/UnrealEd.EditorLoadingSavingSettings]
- INI Section:
/Script/UnrealEd.EditorLoadingSavingSettings
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/EditorLoadingSavingSettings.h:206
Scope (from outer to inner):
file
class class UEditorLoadingSavingSettings : public UObject
Source code excerpt:
/** Whether to automatically prompt for SCC checkout on asset modification */
UPROPERTY(EditAnywhere, config, Category=SourceControl)
uint32 bPromptForCheckoutOnAssetModification:1;
/** Auto add files to source control */
UPROPERTY(EditAnywhere, config, Category=SourceControl, meta=(DisplayName="Add New Files when Modified"))
uint32 bSCCAutoAddNewFiles:1;
/** Use global source control login settings, rather than per-project. Changing this will require you to login again */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/UnrealEdEngine.cpp:610
Scope (from outer to inner):
file
function void UUnrealEdEngine::OnPackageDirtyStateUpdated
Source code excerpt:
const UEditorLoadingSavingSettings* Settings = GetDefault<UEditorLoadingSavingSettings>();
if (!bAlreadyAsked && // Don't ask if we already asked once!
Settings->bPromptForCheckoutOnAssetModification)
{
PackageToNotifyState.Add(Package, NS_Updating);
}
}
}
else
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/UnrealEdSrv.cpp:1357
Scope (from outer to inner):
file
function void UUnrealEdEngine::ShowPackageNotification
Source code excerpt:
// The user disabled prompting on package modification
// A window has capture on the mouse
bool bCanPrompt = !IsUserInteracting() && !GIsSlowTask && !PlayWorld && GetDefault<UEditorLoadingSavingSettings>()->bPromptForCheckoutOnAssetModification && (FSlateApplication::Get().GetMouseCaptureWindow() == NULL);
if( bCanPrompt )
{
bShowPackageNotification = false;
bool bNeedWarningDialog = false;
for (const auto& Entry : PackageToNotifyState)