Hi! I have editor module set up just fine. And it compiles, as long as I do not reference any eidtor-related classes, like ‘Blutility’ or ‘UnrealEd’. The moment I add those to my EditorModule.build.cs, I start getting errors like:
11>PCH.UnrealEd.cpp
11>F:\Program Files\Epic Games\UE_Git4.17\Engine\Source\Developer\SharedSettingsWidgets\Public\SExternalImageReference.h(8): fatal error C1083: Cannot open include file: 'PropertyHandle.h': No such file or directory
11>Module.BlueprintProfiler.cpp
11>F:\Program Files\Epic Games\UE_Git4.17\Engine\Source\Developer\BlueprintProfiler\Public\BlueprintProfiler.h(7): fatal error C1083: Cannot open include file: 'TickableEditorObject.h': No such file or directory
e.t.c.
I wasted whole day trying different bunch of stuff with no real soliution.
I am under Unreal 4.17, my module build file looks like this:
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
public class GAMEEditor : ModuleRules
{
public GAMEEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "GAME", "AnimGraph", "UnrealEd", "BlueprintGraph" });
PrivateDependencyModuleNames.AddRange(
new string]
{
});
PublicIncludePaths.AddRange(
new string]
{
"GAMEEditor/Public"
});
PrivateIncludePaths.AddRange(
new string]
{
"GAMEEditor/Private"
});
}
}
Game.target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class GAMETarget : TargetRules
{
public GAMETarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.AddRange( new string] { "GAME" } );
if (UEBuildConfiguration.bBuildEditor == true)
{
ExtraModuleNames.AddRange(
new string]
{
"GAMEEditor"
});
}
}
}
GAMEEditor.target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class
GAMEEditorTarget : TargetRules
{
public GAMEEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.AddRange( new string] { "GAME", GAMEEditor" } );
}
}
uproject file
....
"FileVersion": 3,
"EngineAssociation": "{0D895E0E-4ECB-40B3-DF32-2F892FD3C93E}",
"Category": "",
"Description": "",
"Modules":
{
"Name": "GAME",
"Type": "Runtime",
"LoadingPhase": "Default"
},
{
"Name": "GAMEEditor",
"Type": "Editor",
"LoadingPhase": "PostEngineInit"
}
],
...
Any help is very appreciated, I am stuck for good with this one