I want to add a processor definition that can be defined at a project level that would set it globally for the engine too.
This is mainly for engine changes that should only be taken into account for a certain project (ie WITH_GAME). Is there any way to define this in the Game.Target.cs or Game.Build.cs ?
This is possible by adding your definition to your Game.Build.cs file.
using UnrealBuildTool;
public class DemoGame : ModuleRules
{
public DemoGame(TargetInfo Target)
{
// Adding your definition here, will add a global Preprocessor value for cpp
Definitions.Add("UE_DEMOGAME=1");
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
}
}