【UE5】第一次尝试项目转插件(Plugin)的时候,无法编译

VS显示100条左右的错误,UE热编译也不能通过。原因可能是[名字.Build.cs]文件的错误,缺少一些内容,比如说如果要写UserWidget类,那么就要在 ]名字.Build.cs]

中加入如下内容:

cpp 复制代码
public class beibaoxitong : ModuleRules
{
	public beibaoxitong(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
		
		PublicIncludePaths.AddRange(
			new string[] {
                 System.IO.Path.Combine(ModuleDirectory, "Public")
				// ... add public include paths required here ...
			}
			);
				
		
		PrivateIncludePaths.AddRange(
			new string[] {
                System.IO.Path.Combine(ModuleDirectory, "Private")
				// ... add other private include paths required here ...
			}
			);
			
		
		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core",
                "CoreUObject",
                      "Engine",
                    "SlateCore",
                    "UMG"			
				// ... add other public dependencies that you statically link with here ...
			, "InputCore", "EnhancedInput","ProceduralMeshComponent"
}
			);
			
		
		PrivateDependencyModuleNames.AddRange(
			new string[]
			{
				"CoreUObject",
				"Engine",
				"Slate",
				"SlateCore",
				// ... add private dependencies that you statically link with here ...	
			"UMGEditor", "UMGEditor","UMG", "InputDevice", "InputDevice", "InputDevice" 
}
			);
		
		
		DynamicallyLoadedModuleNames.AddRange(
			new string[]
			{
				// ... add any modules that your module loads dynamically here ...
			}
			);
	}
}

根据你的文件进行添加。如果说依然有如图的问题,那你就去原来的项目里看看哪些没加上去。

正在创建库 D:\Unreal\Weather\Plugins\beibaoxitong\Binaries\Win64\UnrealEditor-beibaoxitong.patch_1.lib 和对象 D:\Unreal\Weather\Plugins\beibaoxitong\Binaries\Win64\UnrealEditor-beibaoxitong.patch_1.exp

Module.beibaoxitong.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static struct FKey const EKeys::RightMouseButton" (_imp ?RightMouseButton@EKeys@@2UFKey@@B),函数 "public: virtual class FReply __cdecl UInventorySlot::NativeOnMouseButtonDown(struct FGeometry const &,struct FPointerEvent const &)" (?NativeOnMouseButtonDown@UInventorySlot@@UEAA?AVFReply@@AEBUFGeometry@@AEBUFPointerEvent@@@Z) 中引用了该符号

D:\Unreal\Weather\Plugins\beibaoxitong\Binaries\Win64\UnrealEditor-beibaoxitong.patch_1.exe : fatal error LNK1120: 1 个无法解析的外部命令

Failed to link patch (0.000s) (Exit code: 0x460)

相关推荐
电子云与长程纠缠10 小时前
UE5.3中通过编辑器工具创建大纲菜单文件夹
java·ue5·编辑器
DBBH20 小时前
UE5 第三人称学习之动画 control rig
ue5
UTwelve20 小时前
【UE5】一种老派的假反射做法,可以用于移动端,或对反射的速度、清晰度有需求的地方
ue5·虚幻引擎·着色器·虚幻4
UTwelve1 天前
【UE5】可以实时绘制的体积渲染 【第三章 体积纹理绘制 - 3.绘制体积】
ue5
1204157137 肖哥1 天前
UE5.4 PCG基础节点
ue5
DBBH2 天前
UE5 材质篇 1 如何偏移顶点
ue5·材质
孤客网络科技工作室2 天前
虚幻引擎5(UE5)学习教程
java·学习·ue5
暮志未晚Webgl2 天前
105. UE5 GAS RPG 搭建主菜单
ue5
异次元的归来2 天前
UE5相机系统初探(一)
ue5·游戏引擎·camera
DBBH4 天前
UE5 材质篇 0 创建一个材质
ue5