Misleading error message in FEngineLoop::Init

In the file LaunchEngineLoop.cpp in the function FEngineLoop::Init, inside the !GIsEditor section the error message is incorrect it currently reads: “Failed to load UnrealEd Engine class” but it should read: “Failed to load Game Engine class” this came up when I was replacing the GameEngine for our project and had an error and was confused by this misleading message until I checked the code and found that the message was wrong.

`// Incorrect Version - currently in UE
if( !GIsEditor )
{
SCOPED_BOOT_TIMING(“Create GEngine”);
// We’re the game.
FString GameEngineClassName;
GConfig->GetString(TEXT(“/Script/Engine.Engine”), TEXT(“GameEngine”), GameEngineClassName, GEngineIni);
EngineClass = StaticLoadClass( UGameEngine::StaticClass(), nullptr, *GameEngineClassName);
if (EngineClass == nullptr)
{
UE_LOG(LogInit, Fatal, TEXT(“Failed to load UnrealEd Engine class ‘%s’.”), *GameEngineClassName);
}
GEngine = NewObject(GetTransientPackage(), EngineClass);
}

// Corrected version
if( !GIsEditor )
{
SCOPED_BOOT_TIMING(“Create GEngine”);
// We’re the game.
FString GameEngineClassName;
GConfig->GetString(TEXT(“/Script/Engine.Engine”), TEXT(“GameEngine”), GameEngineClassName, GEngineIni);
EngineClass = StaticLoadClass( UGameEngine::StaticClass(), nullptr, *GameEngineClassName);
if (EngineClass == nullptr)
{
UE_LOG(LogInit, Fatal, TEXT(“Failed to load Game Engine class ‘%s’.”), *GameEngineClassName);
}
GEngine = NewObject(GetTransientPackage(), EngineClass);
}`

Hey Mark,

thanks a lot for the report!

I’ve just submitted a fix and this should be visible in UE5/Main soon.

since it’s a trivial fix and we’re in lockdown for 5.6 this will likely only release with 5.7.

Best,

Sebastian

Thanks! That’s great.