When I build my game with editor (Unreal Engine 4.23), everything works just fine.
But when I try to do the build without editor (e.g. for packing it for Android/Windows), I get following error:
Missing precompiled manifest for 'EditorWidgets'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in EditorWidgets.build.cs to override. MyProject H:\MyProject\Intermediate\ProjectFiles\UnrealBuildTool 1
I am not sure what may cause EditorWidgets
to get into way (if I understand correctly, it should not go to build without editor, but something is including it by mistake?).
MyProject.Build.cs looks like this:
using UnrealBuildTool;
public class HiraganaAcademy : ModuleRules
{
public HiraganaAcademy(ReadOnlyTargetRules Target) : base(Target)
{
//PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
//https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1603585-what-s-needed-for-using-c-17
PCHUsage = PCHUsageMode.NoSharedPCHs;
//PrivatePCHHeaderFile = "$pch.h";
CppStandard = CppStandardVersion.Cpp17;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Slate", "SlateCore", "LevelSequence", "MovieScene" });
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore", "UnrealEd", "GenericGraphRuntime", "Json", "JsonUtilities","EditorStyle" });
}
}
My MyProject.uproject
:
{
"FileVersion": 3,
"EngineAssociation": "4.23",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "MyProject",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"UMG",
"Engine",
"CoreUObject",
"GenericGraphRuntime",
"Blutility"
]
}
],
"Plugins": [
{
"Name": "EditorScriptingUtilities",
"Enabled": true
}
]
}
I also use GenericGraph Plugin with it’s GenericGraphRuntime.Build.cs (I believe this one is called):
using UnrealBuildTool;
public class GenericGraphRuntime : ModuleRules
{
public GenericGraphRuntime(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string[] {
}
);
PrivateIncludePaths.AddRange(
new string[] {
"GenericGraphRuntime/Private",
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core", "CoreUObject", "Engine",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Slate",
"SlateCore",
"GameplayTags"
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
}
);
}
}
GenericGraph.unplugin
:
{
"FileVersion" : 3,
"Version" : 1,
"VersionName" : "1.0",
"FriendlyName" : "Generic Graph Plugin",
"Description" : "",
"Category" : "GenericGraph",
"CreatedBy" : "jinyuliao",
"CreatedByURL" : "",
"DocsURL" : "",
"MarketplaceURL" : "",
"SupportURL" : "",
"EnabledByDefault" : true,
"CanContainContent" : true,
"IsBetaVersion" : false,
"Installed" : false,
"Modules" :
[
{
"Name" : "GenericGraphRuntime",
"Type" : "Runtime",
"LoadingPhase" : "PreDefault"
},
{
"Name" : "GenericGraphEditor",
"Type" : "Editor",
"LoadingPhase" : "Default"
}
]
}
From searching through Internet I noticed something about not using UFactory
in build without editor? Is it enough to put it inside #if WITH_EDITORONLY_DATA ... #endif
?
What about UEditorUtilityWidget
?
What else classes/headers I should not include and how?