Non-Unity Build

Build Configurations

Unity Build:

In CI/CD Pipeline the project is checked into two builds: Unity and Non Unity. In the wizard (in the develop branch) in the project settings, the project is compiled in the Unity configuration by default. In this configuration, UBT (Unreal Build Tool) combines multiple .cpp files into one. This reduces compilation time when building large projects, as fewer files and included headers need to be processed.

Non-Unity Build:

In Non-Unity UBT will not merge .cpp files and processes each “translation unit” separately, as it is done in most compilers and IDEs. That's why Non-Unity builds are likely to miss some unincluded “includes” and get errors.

Therefore, before pushing your work into the wizard, you should check not only the error-free build in the Unity configuration (which runs by default when you click on the “Build” button in the IDE when you start the editor), but also check not only the error-free build in the Unity configuration (which runs by default when you click on the “Build” button in the IDE when you start the editor) but also check for an error-free build in the Non-Unity configuration. It is highly probable that in Non-Unity you don't have some “includes” enabled and the compiler will swear. It is worth noting that building means not Packaging of the project, but launching it from the IDE editor. You do not need to build the project. It is enough to make sure that the project is compiled and the editor is launched from the IDE without errors.

How to test locally a Non-Unity build:

The following files are required ProjectName\Source\ProjectName.Target.cs and ProjectNameEditor.Target.cs

add the following flags:

bUseUnityBuild = false; 

bUsePCHFiles = false;

Uh, also, in the file Source\ProjectName\ProjectName.Build.cs add :

PCHUsage = PCHUsageMode.NoPCHs; bUseUnity = false;