【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)

相关推荐
远离UE42 天前
UE5 UV邻接 Niagara潜水模拟 学习笔记
ue5·uv
AA陈超2 天前
005 T03 — 角色基类与移动系统 详细功能设计文档
ue5
AA陈超2 天前
004 T02 - 俯视角摄像机系统 设计文档
网络·c++·ue5·虚幻引擎
AA陈超3 天前
006 T03 — 蓝图操作指南
c++·游戏·架构·ue5·github·虚幻引擎
Duo1J5 天前
【UE】Slate 编辑器工具开发01 - Slate语法 & 常用控件
ue5·编辑器·游戏引擎·ue4
朗迹 - 张伟5 天前
UE5.7 PCG从入门到精通系列课程【第五课:PCG沿一条样条线生成物体】
ue5·pcg
AA陈超6 天前
003 XiYou 西游 — P0 阶段实施计划
c++·笔记·学习·ue5
朗迹 - 张伟7 天前
UE5.7 PCG从入门到精通系列课程【第三课:程序化生成森林】
ue5·pcg
朗迹 - 张伟7 天前
UE5.7 PCG从入门到精通系列课程【第二课:使用PCG制作草地系统】
ue5·pcg
im长街8 天前
UE 课程介绍 - 1. 3DMax软件建模基础
ue5·3dsmax