I’m trying to build my projects without Visual Studio I want to see how it is done and also Visual Studio is humongus slugish and slow, just not my kind of thing.
So I followed a tutorial on how to build projects without VS.
This is the tutorial.
I followed it step by step and digested it down to understand it, but when I run from command prompt the following:
"C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" pdanEditor Win64 Development "C:\learnue\pdan\pdan.uproject" -waitmutex -NoHotReload
I get error.
ERROR: Expecting to find a type to be declared in a target rules named 'pdanEditorTarget'. This type must derive from the 'TargetRules' type defined by Unreal Build Tool.
This is my pdanEditor.Target.cs file
using UnrealBuildTool;
using System.Collections.Generic;
public class EditorTarget : TargetRules
{
public EditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "pdanCore" } );
}
}
========================================
I have two target files pdan.Target.cs and pdanEditor.Target.cs.
Under the Type label inside the files where you fill in the types pdan.Target.cs is type Game. and pdanEditor.Target.cs is type Editor
I tried changing: Type = TargetType.Editor; to Type = TargetType.EditorTarget;
Since I thought maybe it was explicit in the error it gave me asking for something:'pdanEditorTarget
So I changed inside the “pdanEditor.Target.cs”
From: Type = TargetType.Editor; To: Type = TargetType.EditorTarget;
now the error has changed and I get another form of error:
c:\learnue\pdan\source\pdanEditor.Target.cs(8,21) : error CS0117: 'UnrealBuildTool.TargetRules.TargetType' does not contain a definition for 'EditorTarget'
ERROR: Unable to compile source files.
It says it does not exist yet when I hit the “.” after Type = TargetType it let’s me fill in in fill in mode with"EditorTarget"
Either way I can’t compile the project.
Can someone please help me. Is the tutorial depreciated maybe ?
I’m using the latest UE4 version, just downloaded it a few days ago.