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

相关推荐
mengzhi啊1 小时前
ue5 在一个蒙太奇的上半身插槽放两段动画,用片段1,2作为区分。播放动画蒙太奇,自由选择片段1,2
ue5
子燕若水1 天前
UE5 开启“Python Remote Execution“
ue5
我要吐泡泡了哦1 天前
虚幻5路径追踪渲染器(PT和DF的效果差别与PT速度性能)-李文磊-技术分享笔记
笔记·ue5·图形渲染
ue星空7 天前
模之屋模型导入到UE5
ue5·蓝图
mengzhi啊7 天前
ue5 设置角色属性(生命值,蓝条值,能量值)c++
ue5
ue星空7 天前
UE5游戏性能优化指南
游戏·性能优化·ue5·蓝图
电子云与长程纠缠8 天前
在UE5中使用视差贴图
学习·缓存·ue5·编辑器·贴图
子燕若水9 天前
Unreal Engine 5 (UE5) Metahuman 的头部材质
前端·ue5·材质
ue星空9 天前
UE材质节点Fresnel
ue5·材质
ue星空9 天前
UE材质控制UV
ue5·材质·uv