Command line arguments do not apply to the UProjectNameEditor.Target.cs.
- Add to ProjectNameEditor.Target.cs:
public class ProjectNameEditorTarget : TargetRules {
[CommandLine("-UnoptimizedCode")]
public bool bUnoptimizedCode { get; set; }
public ProjectNameEditorTarget(TargetInfo Target) : base(Target) {
Console.WriteLine(bUnoptimizedCode);
..
- Run PowerShell and enter:
../Automation/RunTest.ps1 -UProjectName "ProjectName" -UEngineDir "../Epic Games/UE_5.4" -BuildFlags "-Platform=Win64, -ClientConfig=Development, -Build, -Cook, -ubtargs=`"-UnoptimizedCode`""
- The console will print: False.