UE4报错 Unable to instantiate UnrealEd module for non-editor targets

背景

UE4工程编译中,遇到下面报错:

2>UnrealBuildTool: Error : Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.

(referenced via Target -> CrossPlatformAutoTest.Build.cs -> MyGameGameplay.Build.cs -> AutomatedTesting.Build.cs)

分析与解决方案

这行报错位于:

// Engine\Source\Editor\UnrealEd\UnrealEd.Build.cs

public class UnrealEd : ModuleRules

{

public UnrealEd(ReadOnlyTargetRules Target) : base(Target)

{

if(Target.Type != TargetType.Editor)

{

throw new BuildException("Unable to instantiate UnrealEd module for non-editor targets.");

}

本身 UnrealEd 的含义就是 Editor 的意思,因此 无法在 non-editor 的目标中使用。

然后从报错去追踪 AutomatedTesting.Build.cs ,可以看到下面引用:

if (Target.Type == TargetRules.TargetType.Editor || Target.Type== TargetRules.TargetType.Client)

{

PrivateDependencyModuleNames.AddRange(new string\[\] { "UnrealEd", });

}

把 Client 给去掉就好了。

相关推荐
Yuk丶9 天前
厌倦了假AI对话?本地 LLM 语音对话 + 口型同步系统 2.0(已开源!)
c++·人工智能·语言模型·开源·ue4·语音识别·游戏开发
归真仙人9 天前
【UE】LineTraceByProfile
ue5·游戏引擎·ue4·unreal engine
上山老人20 天前
UE4布娃娃约束修改
ue4
Yuk丶24 天前
厌倦了假AI对话?用本地大模型给UE注入真智能(已开源!)
c++·人工智能·开源·ue4·游戏程序·ue4客户端开发
emplace_back25 天前
UE 使用UE4PrereqSetup_x64.exe一键安装依赖
ue4
Yuk丶1 个月前
LPM的AI 角色三大核心技术实现:长效记忆、人格锁定、低延迟口语化
人工智能·ai·ue4·虚幻·ue4客户端开发
归真仙人1 个月前
【UE】Lightmass可执行文件已经过时
ue5·游戏引擎·ue4·虚幻·unreal engine
DoomGT1 个月前
Design - 一些免费图标网站
ue5·ue4·虚幻·虚幻引擎·unreal engine
归真仙人1 个月前
【UE】VR一体机转场
ue5·ue4·vr·虚幻引擎·unreal engine
洋洋06171 个月前
UE4/UE5 引擎常见面试题总结(1)
ue5·ue4