Developing with multiple Unreal Engine 5.0 versions (EA/Preview/RTM)

post-thumb

Unreal Engine 5.0 RTM Has released!

Yay!

Unreal Engine 5.0 RTM is out now:
https://www.epicgames.com/site/en-US/news/epic-games-releases-unreal-engine-5-for-all-creators

You have a project stuck on 5.0EA?

Boo!

Most existing 5.0EA or 5.0 Preview projects cannot update to 5.0 RTM immediately. Ugh.

You downloaded 5.0 RTM to check it out?

Yay!

For those who don’t build the engine from source, the launcher allows installation of multiple 5.0 versions simultaneously.

5.0EA, 5.0Preview, and 5.0 RTM are all “5.0”!

Boo! No more 5.0 EA project file generator? WTF

You’d think the UE version selector, preprocessor definitions, etc etc would be able to disambiguate between the various versions of Unreal Engine 5.0. Nope. They’re all UE 5.0.

If you use the Win64 explorer extension to generate Visual Studio files, you’ll find it now generates 5.0 RTM solutions. This will usually break a projects build (if it’s been developed on 5.0 EA or 5.0 Preview). The version selector isn’t any help, because as far as it’s concerned there’s only one “5.0” - RTM.

No problem, there’s a command line for everything

Yay!

Of course, the tooling for each UE version can still be invoked… Including rebuilding project files for whichever IDE/platform you use.

On Windows/for Visual Studio it’s easy enough to regenerate the solution files by command line. Just drop a little .bat file into the project’s root directory, UnrealBuildTool -Mode=GenerateProjectFiles rebuilds the VS solution.

For example, GenerateProjectStudioFiles.bat for a project that only builds with the 5.0 Early Access build:

set UBT="C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe"
set ProjectPath=C:\perforce\SpaceFlight
set ProjectFile=%ProjectPath%\SpaceFlight.uproject

pushd .
cd %ProjectPath%

%UBT% -Mode=GenerateProjectFiles -Project=%ProjectFile% -2019 -CleanProjects
popd

This will call UnrealBuildTool for 5.0 Early Access as:

"C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe" -Mode=GenerateProjectFiles -Project=C:\perforce\SpaceFlight\SpaceFlight.uproject -2019 -CleanProjects

And now, you can just double-click the .bat file instead right-clicking the solution file for the UE context menu.

The command line was inferred by spending a couple of minutes looking through the UnrealBuildTool source code. Anything else you need that’s specific to a particular 5.0 version should be easy enough to find as well. Isn’t Source-Available software great?

That’s all you need to do to run the various UE5.0 flavors side-by-side without conflicts. :).