How can i define my own BUILD mode?

Hi there,

I would like to know how can i create custom build configurations. For example, we can include specific codes in Shipping build if we wrap them like this:

     //do stuff

Just like that, i want some features in my game to only appear on demo build. So i would like to do something like this:

     //do stuff

After digging through source i think i have to modify the Build.h file and UEBuildPlatform.cs (under switch (CheckConfig) block ). Is this the right way?

Quick Bump

One more bump…

Hi Ryanjon,

You can create additional Target.cs files, and in them, override SetupGlobalEnvironment and add something like:


As long as you are careful to not use the define in a header that is consumed by other modules (these defines are only set internally when compiling this module, and won’t be defined when compiling other modules that consume headers from it), you can also add stuff in a particular module Build.cs:


Michael Noland