NavigationSystemClassName

NavigationSystemClassName

#Overview

name: NavigationSystemClassName

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 NavigationSystemClassName is to specify the class to be used for the Navigation System in Unreal Engine 5. This setting variable is crucial for the AI and navigation subsystems of the engine.

The Unreal Engine subsystem that primarily relies on this setting variable is the Navigation System. It’s used to determine which class will be instantiated to handle navigation-related tasks in the game world.

The value of this variable is set in the engine configuration files, typically in the DefaultEngine.ini file. It’s a global config property, as indicated by the UPROPERTY macro in the Engine.h file.

NavigationSystemClassName interacts closely with NavigationSystemClass. The NavigationSystemClassName is used to load and set the NavigationSystemClass, which is the actual class object used for instantiation.

Developers must be aware that changing this variable will affect the entire navigation system of their game. It should be modified only when there’s a need to implement custom navigation behavior that differs from the default Unreal Engine navigation system.

Best practices when using this variable include:

  1. Ensure that the class specified exists and inherits from UNavigationSystemBase.
  2. Make changes to this variable early in the development process, as it can have far-reaching effects on AI and navigation throughout the project.
  3. If custom navigation is needed, consider creating a derived class from the default navigation system class rather than replacing it entirely.
  4. Always test thoroughly after changing this variable, as it can affect pathfinding, AI behavior, and other navigation-related functionalities.
  5. Document any changes to this variable clearly, as it’s a fundamental engine setting that other developers working on the project need to be aware of.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:128, section: [/Script/Engine.Engine]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Engine.h:801

Scope (from outer to inner):

file
class        class UEngine : public UObject , public FExec

Source code excerpt:


	UPROPERTY(globalconfig, noclear, meta=(MetaClass="/Script/NavigationSystem.NavigationSystem", DisplayName="Navigation System Class"))
	FSoftClassPath NavigationSystemClassName;

	/** Sets the class to use for NavigationSystem, which can be overridden to change game-specific navigation/AI behavior. */
	UPROPERTY()
	TSubclassOf<class UNavigationSystemBase>  NavigationSystemClass;

	/** Sets the Navigation System Config class, which can be overridden to change game-specific navigation/AI behavior. */

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AI/NavigationSystemConfig.cpp:13

Scope (from outer to inner):

file
function     UNavigationSystemConfig::UNavigationSystemConfig

Source code excerpt:

	if (GEngine)
	{
		NavigationSystemClass = GEngine->NavigationSystemClassName;
	}
}

TSubclassOf<UNavigationSystemConfig> UNavigationSystemConfig::GetDefaultConfigClass()
{
	return GEngine ? GEngine->NavigationSystemConfigClass : nullptr;

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp:3225

Scope (from outer to inner):

file
function     void UEngine::InitializeObjectReferences

Source code excerpt:

	LoadEngineClass<ULocalPlayer>(LocalPlayerClassName, LocalPlayerClass);
	LoadEngineClass<AWorldSettings>(WorldSettingsClassName, WorldSettingsClass);
	LoadEngineClass<UNavigationSystemBase>(NavigationSystemClassName, NavigationSystemClass);
	LoadEngineClass<UNavigationSystemConfig>(NavigationSystemConfigClassName, NavigationSystemConfigClass);
	if (AvoidanceManagerClassName.IsValid())
	{
		LoadEngineClass<UAvoidanceManager>(AvoidanceManagerClassName, AvoidanceManagerClass);
	}
	LoadEngineClass<UGameUserSettings>(GameUserSettingsClassName, GameUserSettingsClass);