UE4——找不到"UnLuaInterface.h"

Posted 夜溅樱

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UE4——找不到"UnLuaInterface.h"相关的知识,希望对你有一定的参考价值。

菜鸟级错误。

如果你要引用插件中的头文件,那么一定需要在UE4项目名.build.cs中这里添加上插件名字:

using UnrealBuildTool;

public class 项目名 : ModuleRules
{
	public 项目名(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
		// 这里添加上插件名字,如果找不到标题中的头文件,要在这里加上"UnLua"
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "WebSockets", "UnLua"});

		PrivateDependencyModuleNames.AddRange(new string[] {  });

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
		
		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");

		// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
	}
}

添加之后重新生成项目或者刷新项目即可。

以上是关于UE4——找不到"UnLuaInterface.h"的主要内容,如果未能解决你的问题,请参考以下文章

UE4.27 VScode 找不到源文件修复方法

UE4.27 VScode 找不到源文件修复方法

UE4.27 VScode 找不到源文件修复方法

Ue4类设置找不到基类

mac UE4的安装路径

UE4学习杂项总结一