Hello!
In UE 4.15 I used in Game.Build.cs
if (Target.Type.HasValue && (Target.Type.Value == TargetRules.TargetType.Server))
{
Definitions.Add("WITH_SERVER_CODE=1");
}
else
{
Definitions.Add("WITH_SERVER_CODE=0");
}
But in UE 4.17 it makes errors
Game.Build.cs(19,25): error CS1061: 'UnrealBuildTool.TargetType' does not contain a definition for 'HasValue' and no extension method 'HasValue' accepting a first argument of type 'UnrealBuildTool.TargetType' could be found (are you missing a using directive or an assembly reference?)
Game.Build.cs(19,50): error CS1061: 'UnrealBuildTool.TargetType' does not contain a definition for 'Value' and no extension method 'Value' accepting a first argument of type 'UnrealBuildTool.TargetType' could be found (are you missing a using directive or an assembly reference?)
How can I repeat that logic on UE 4.17?
Best regards,
Lucas.