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);
}`