UnrealEdEngine
UnrealEdEngine
#Overview
name: UnrealEdEngine
The value of this variable can be defined or overridden in .ini config files. 2
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of UnrealEdEngine is to serve as the core engine class for the Unreal Editor environment. It is responsible for managing and coordinating various editor-specific functionalities within the Unreal Engine ecosystem.
UnrealEdEngine is primarily used by the Unreal Editor and related editor-specific modules. Based on the callsites, we can see that it’s utilized in the following subsystems and plugins:
- MediaPlayerEditor plugin
- DisplayClusterEditor plugin
- Core engine initialization (LaunchEngineLoop)
The value of this variable is typically set during the engine initialization process. In the LaunchEngineLoop.cpp file, we can see that the UnrealEdEngine class is loaded and instantiated based on a configuration setting in the engine’s INI file.
UnrealEdEngine interacts with several other variables and systems:
- It’s used to register component visualizers in the MediaPlayerEditor plugin.
- In the DisplayClusterEditor plugin, it’s referenced in configuration settings for the editor engine.
- During engine initialization, it’s assigned to global variables like GEngine, GEditor, and GUnrealEd.
Developers should be aware of the following when working with UnrealEdEngine:
- It’s a critical part of the editor environment, and modifications can have wide-ranging effects on editor functionality.
- The actual class used for UnrealEdEngine can be configured in the engine’s INI files, allowing for customization if needed.
- It’s closely tied to other important engine subsystems and global variables.
Best practices when using UnrealEdEngine include:
- Avoid direct modifications to the UnrealEdEngine instance unless absolutely necessary.
- When extending editor functionality, use the proper APIs and extension points provided by UnrealEdEngine rather than trying to override or replace it.
- Be cautious when changing UnrealEdEngine-related configuration settings, as they can affect the entire editor environment.
- When developing editor plugins or tools, use the appropriate interfaces and methods provided by UnrealEdEngine to ensure compatibility and stability.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:140, section: [/Script/Engine.Engine]
- INI Section:
/Script/Engine.Engine
- Raw value:
/Script/UnrealEd.UnrealEdEngine
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:23, section: [/Script/Engine.Engine]
- INI Section:
/Script/Engine.Engine
- Raw value:
/Script/LyraEditor.LyraEditorEngine
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Media/MediaPlayerEditor/Source/MediaPlayerEditor/Private/MediaPlayerEditorModule.cpp:292
Scope (from outer to inner):
file
class class FMediaPlayerEditorModule : public IHasMenuExtensibility , public IHasToolBarExtensibility , public IMediaPlayerEditorModule
function void RegisterVisualizer
Source code excerpt:
* @param Visualizer The component visualizer to register.
*/
void RegisterVisualizer(UUnrealEdEngine& UnrealEdEngine, const FName& ComponentClassName, const TSharedRef<FComponentVisualizer>& Visualizer)
{
UnrealEdEngine.RegisterComponentVisualizer(ComponentClassName, Visualizer);
Visualizer->OnRegister();
}
/** Unregister all component visualizers. */
void UnregisterVisualizers()
{
#Loc: <Workspace>/Engine/Plugins/Runtime/nDisplay/Source/DisplayClusterEditor/Private/Settings/DisplayClusterEditorSettings.cpp:55
Scope (from outer to inner):
file
function void UDisplayClusterEditorSettings::PostEditChangeProperty
Source code excerpt:
// DefaultEngine.ini
GConfig->SetString(TEXT("/Script/Engine.Engine"), TEXT("GameEngine"), TEXT("/Script/DisplayCluster.DisplayClusterGameEngine"), DefaultEnginePath);
GConfig->SetString(TEXT("/Script/Engine.Engine"), TEXT("UnrealEdEngine"), TEXT("/Script/DisplayClusterEditor.DisplayClusterEditorEngine"), DefaultEnginePath);
GConfig->SetString(TEXT("/Script/Engine.Engine"), TEXT("GameViewportClientClassName"), TEXT("/Script/DisplayCluster.DisplayClusterViewportClient"), DefaultEnginePath);
// DefaultGame.ini
GConfig->SetString(TEXT("/Script/EngineSettings.GeneralProjectSettings"), TEXT("bUseBorderlessWindow"), TEXT("True"), DefaultGamePath);
// DefaultInput.ini
#Loc: <Workspace>/Engine/Plugins/Runtime/nDisplay/Source/DisplayClusterEditor/Private/Settings/DisplayClusterEditorSettings.cpp:69
Scope (from outer to inner):
file
function void UDisplayClusterEditorSettings::PostEditChangeProperty
Source code excerpt:
// DefaultEngine.ini
GConfig->SetString(TEXT("/Script/Engine.Engine"), TEXT("GameEngine"), TEXT("/Script/Engine.GameEngine"), DefaultEnginePath);
GConfig->SetString(TEXT("/Script/Engine.Engine"), TEXT("UnrealEdEngine"), TEXT("/Script/UnrealEd.UnrealEdEngine"), DefaultEnginePath);
GConfig->SetString(TEXT("/Script/Engine.Engine"), TEXT("GameViewportClientClassName"), TEXT("/Script/Engine.GameViewportClient"), DefaultEnginePath);
// DefaultGame.ini
GConfig->SetString(TEXT("/Script/EngineSettings.GeneralProjectSettings"), TEXT("bUseBorderlessWindow"), TEXT("False"), DefaultGamePath);
// DefaultInput.ini
#Loc: <Workspace>/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:4834
Scope (from outer to inner):
file
function int32 FEngineLoop::Init
Source code excerpt:
// We're UnrealEd.
FString UnrealEdEngineClassName;
GConfig->GetString(TEXT("/Script/Engine.Engine"), TEXT("UnrealEdEngine"), UnrealEdEngineClassName, GEngineIni);
EngineClass = StaticLoadClass(UUnrealEdEngine::StaticClass(), nullptr, *UnrealEdEngineClassName);
if (EngineClass == nullptr)
{
UE_LOG(LogInit, Fatal, TEXT("Failed to load UnrealEd Engine class '%s'."), *UnrealEdEngineClassName);
}
GEngine = GEditor = GUnrealEd = NewObject<UUnrealEdEngine>(GetTransientPackage(), EngineClass);