I’m attempting to create a new build target for my game that will produce a client with extra “stuff” added i.e. I want to define a macro/preprocessor directive which I can use to #if include code in this build only. To this end I have created a new *.Target.cs file.
I have attempted to define my macro by adding GlobalDefinitions.Add("MY_MACRO=1")
to my *.target.cs file, but this does not appear to be picked up by Visual Studio.
I have been able to add a macro to my *.build.cs file using PublicDefinitions.add("MY_MACRO=1")
, which is picked up by Visual Studio, but this is then always defined (not only when I select my desired target).
Am I going about this in the wrong way?