I would like to know if there is an option, or line of code I can edit, to limit the amount of CPU cores it uses to build the project. I only have 8 Gig RAM and run out of RAM during compilation, thus the build fails. I have to build it multiple times in order to complete the build process, each times it builds a little bit at a time.
I have limited the CPUs in Visual Studio, but I know UBT builds the source on it’s own, so that’s probably why it didn’t work.
/// <summary>
/// Processor count multiplier for local execution. Can be below 1 to reserve CPU for other tasks.
/// </summary>
[XmlConfig]
public static double ProcessorCountMultiplier;
// When using the local executor (not XGE), run a single action on each CPU core. Note that you can set this to a larger value
// to get slightly faster build times in many cases, but your computer's responsiveness during compiling may be much worse.
ProcessorCountMultiplier = 1.0;
With latest master (4.6, didn’t make it to 4.5) there’s an option.
Add MaxProcessorCount tag to Engine/Saved/UnrealBuildTool/BuildConfiguration.xml. Something like this: