bNavigationAutoUpdate
bNavigationAutoUpdate
#Overview
name: bNavigationAutoUpdate
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 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bNavigationAutoUpdate is to control whether the navigation system in Unreal Engine 5 automatically updates when changes are made to the level or world. This setting is primarily used for the navigation and pathfinding system in the editor.
The Unreal Engine subsystem that relies on this setting variable is the Navigation System, specifically within the editor environment. It’s part of the UnrealEd module, which is responsible for editor-specific functionality.
The value of this variable is set in the LevelEditorMiscSettings class, which is part of the editor settings. It can be modified through the editor’s project settings interface or programmatically.
This variable interacts closely with the Navigation System. When set to true, it triggers automatic rebuilding of navigation data when relevant changes occur in the level.
Developers must be aware that enabling this setting can impact editor performance, especially in large or complex levels, as it may cause frequent navigation rebuilds. It’s also important to note that this setting only affects the editor environment and not the runtime behavior of the game.
Best practices when using this variable include:
- Enable it during active level design to ensure navigation data stays up-to-date.
- Consider disabling it temporarily when making extensive changes to a level to avoid unnecessary rebuilds.
- Be mindful of performance implications in large levels.
- Use it in conjunction with manual navigation rebuilds when necessary, especially for final polish or optimization.
- Ensure it’s properly set before packaging a project to avoid unexpected behavior.
By managing this setting effectively, developers can balance between having up-to-date navigation data and maintaining editor performance during the development process.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:203, section: [/Script/UnrealEd.LevelEditorMiscSettings]
- INI Section:
/Script/UnrealEd.LevelEditorMiscSettings
- Raw value:
True
- 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/LevelEditorMiscSettings.h:37
Scope (from outer to inner):
file
class class ULevelEditorMiscSettings : public UDeveloperSettings
Source code excerpt:
/** If true, Navigation will auto-update */
UPROPERTY(EditAnywhere, config, Category=Editing, meta=( DisplayName = "Update Navigation Automatically" ))
uint32 bNavigationAutoUpdate:1;
/** If enabled, replacing actors will respect the scale of the original actor. Otherwise, the replaced actors will have a scale of 1.0 */
UPROPERTY(EditAnywhere, config, Category=Editing, meta=( DisplayName = "Preserve Actor Scale on Replace" ))
uint32 bReplaceRespectsScale:1;
/** If enabled, will avoid relabeling actors in UUnrealEdEngine::edactPasteSelected */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorBuildUtils.cpp:378
Scope (from outer to inner):
file
function bool FEditorBuildUtils::EditorBuild
Source code excerpt:
GUnrealEd->Exec( InWorld, TEXT("MAP REBUILD") );
if (GetDefault<ULevelEditorMiscSettings>()->bNavigationAutoUpdate)
{
TriggerNavigationBuilder(InWorld, Id);
}
// No need to dirty the persient level if we're building BSP for a sub-level.
bDirtyPersistentLevel = false;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorBuildUtils.cpp:398
Scope (from outer to inner):
file
function bool FEditorBuildUtils::EditorBuild
Source code excerpt:
GUnrealEd->Exec( InWorld, TEXT("MAP REBUILD ALLVISIBLE") );
if (GetDefault<ULevelEditorMiscSettings>()->bNavigationAutoUpdate)
{
TriggerNavigationBuilder(InWorld, Id);
}
}
}
else if (Id == FBuildOptions::BuildLighting)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:867
Scope (from outer to inner):
file
function void UEditorEngine::InitEditor
Source code excerpt:
// Set navigation system property indicating whether navigation is supposed to rebuild automatically
FWorldContext &EditorContext = GetEditorWorldContext();
FNavigationSystem::SetNavigationAutoUpdateEnabled(GetDefault<ULevelEditorMiscSettings>()->bNavigationAutoUpdate, EditorContext.World()->GetNavigationSystem());
// Allocate temporary model.
TempModel = NewObject<UModel>();
TempModel->Initialize(nullptr, 1);
ConversionTempModel = NewObject<UModel>();
ConversionTempModel->Initialize(nullptr, 1);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/NavigationBuildingNotification.cpp:155
Scope (from outer to inner):
file
function void FNavigationBuildingNotificationImpl::Tick
Source code excerpt:
UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(EditorContext.World());
const bool bBuildInProgress = NavSys != nullptr
&& (GetDefault<ULevelEditorMiscSettings>()->bNavigationAutoUpdate ? NavSys->IsNavigationBuildInProgress() : NavSys->GetNumRunningBuildTasks() > 0)
&& NavSys->GetNumRemainingBuildTasks() > 0;
if (!bPreviouslyDetectedBuild && bBuildInProgress)
{
TimeOfStartedBuild = FPlatformTime::Seconds();
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:479
Scope (from outer to inner):
file
function void ULevelEditorMiscSettings::PostEditChangeProperty
Source code excerpt:
{
FWorldContext &EditorContext = GEditor->GetEditorWorldContext();
FNavigationSystem::SetNavigationAutoUpdateEnabled(bNavigationAutoUpdate, EditorContext.World()->GetNavigationSystem());
}
if (!FUnrealEdMisc::Get().IsDeletePreferences())
{
SaveConfig();
}