Exclude file from unity build


I need to implement some platform-specific piece of code. Pretty small one. The issue is, Windows.h being included conditionally in my implementation file creates conflict with some UE code due to unity builds. Is it possible to mark certain CPP file as “always build standalone”?


Workarounded it by creating separate module and setting

MinSourceFilesForUnityBuildOverride = System.Int32.MaxValue;

in its .Build.cs file.

bUseUnity = false;

For the module is less hacky.