插件类未在UE4构建中包含

3

我是UE4的初学者。

最近我在公司里使用一些旧代码,需要调整一个旧的UE4插件,以处理我们平台上的一些HTTP调用。在编辑器中,一切都正常,但在任何形式的构建中都无法正常运行。

我目前正在尝试从蓝图引用(或实例化,如果缺失的话)一个在我的C++插件中定义的Actor,但无论我怎么做,该类似乎在构建中不存在。我目前使用的是Unreal 4.21,在编辑器中一切都按预期工作,只有在构建时出现问题。

我已经按照这个指南进行了操作,但并没有帮助我解决问题,因为我不需要将EnabledPlugins=YourPlugin设置为静态。插件位于Engine/Plugins/Runtime下,清单已将其设置为已安装,并且我已经为我要构建的平台构建了解决方案。我真的很迷惑,希望能得到任何帮助!

这些是相关的日志:

[2019.11.05-19.47.41:442][  0]LogStreaming: Error: Couldn't find file for package /Script/DataLogger requested by async loading code. NameToLoad: /Script/DataLogger
[2019.11.05-19.47.41:442][  0]LogStreaming: Error: Found 1 dependent packages...
[2019.11.05-19.47.41:442][  0]LogStreaming: Error:   /Game/Blueprints/Tech/CustomGameInstance
[2019.11.05-19.47.41:446][  0]LogScript: Warning: Accessed None
CustomGameInstance_C /Engine/Transient.GameEngine_0:CustomGameInstance_C_0
Function /Game/Blueprints/Tech/CustomGameInstance.CustomGameInstance_C:SetPlayerData:0245
[2019.11.05-19.47.41:446][  0]LogScript: Warning: Script call stack:
Function /Game/Blueprints/Tech/CustomGameInstance.CustomGameInstance_C:ReceiveInit
Function /Game/Blueprints/Tech/CustomGameInstance.CustomGameInstance_C:ExecuteUbergraph_CustomGameInstance
Function /Game/Blueprints/Tech/CustomGameInstance.CustomGameInstance_C:SetPlayerData

并且,向前几行也有一些内容:
LogScript: Warning: UGameplayStatics::BeginSpawningActorFromClass: can not spawn an actor from a NULL class

我在UE5上遇到了同样的问题,但是找不到解决方案。不幸的是,Zod发布的解决方案并没有解决它。 - Nande
1个回答

0
你可以右键单击项目可执行文件,选择“生成Visual Studio项目文件”,然后再试一次。此外,你可以用记事本打开项目可执行文件,并检查插件文件夹是否存在。
如果这些方法都不行,那么看起来你需要查看打包设置,因为在编辑器中它可以正常工作。你可以手动包含要捆绑到构建中的文件夹,尝试检查打包设置并包括插件文件夹。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接