无法用编译插件打包游戏,缺少预编译的清单

发布于 2025-01-23 00:42:04 字数 1518 浏览 0 评论 0原文

我们通过以下步骤打包插件,

  1. 打包插件并添加bprecompile = true in myplugin.build.cs (还尝试使用-precompile参数将构建包装打包) 包装之前myplugin.build.cs

     公共类myplugin:模量
         {
             公共MyPlugin(Readonlytargetrules目标):基础(目标)
         {
             pChusage = modulerules.pchusagemode.usexpliticorsharedpchs;
             precompilefortargets = precompileTargetStype.any;
         bpreCompile = true;
     
  2. 包装后,添加buseprecompiled = trueprecompilefortargets = precompileTargetStype.any; in in > myplugin.build.cs 包装后myplugin.build.cs

     公共类myplugin:模量
     {
         公共MyPlugin(Readonlytargetrules目标):基础(目标)
         {
             pChusage = modulerules.pchusagemode.usexpliticorsharedpchs;
             precompilefortargets = precompileTargetStype.any;
         buseprecompiled = true;
     
  3. 删除的C ++文件&包装插件的中间文件夹 将插件与示例项目(包含在插件目录中)一起使用,并且没有任何问题加载。 但是,当我们尝试打包游戏或尝试启动游戏时,我们会收到以下错误:

    uathelper:包装(Windows(64位)):错误:缺少“ MyPlugin”的预编译。该模块很可能未标记为被包含在预编译的构建中 - precompilefortargets = precompileTargetStype.yany; in myplugin.build.build.cs to覆盖。



    packagingResults:错误:缺少“ myplugin”的预编译。该模块很可能没有标记为被包含在预编译的构建中 - precompilefortargets = precompileTargetStype.yany; in myplugin.build.build.cs propride。

We packaged a plugin by following steps,

  1. Packaged the plugin and added bPrecompile=true in myplugin.build.cs
    (Also tried to package the build with -precompile argument)
    Before packaging myplugin.build.cs,

     public class MyPlugin : ModuleRules
         {
             public MyPlugin(ReadOnlyTargetRules Target) : base(Target)
         {
             PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
             PrecompileForTargets = PrecompileTargetsType.Any;
         bPrecompile = true;
    
  2. After packaging, added bUsePrecompiled = true and PrecompileForTargets = PrecompileTargetsType.Any; in myplugin.build.cs
    after packaging MyPlugin.build.cs,

     public class MyPlugin : ModuleRules
     {
         public MyPlugin(ReadOnlyTargetRules Target) : base(Target)
         {
             PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
             PrecompileForTargets = PrecompileTargetsType.Any;
         bUsePrecompiled = true;
    
  3. Deleted C++ files & intermediate folder from the packaged plugin
    Used the plugin with a sample project (Included in the Plugin directory) and it is loaded without any issues.
    But when we tried to package the game or try to launch the game we are getting the following error:

    UATHelper: Packaging (Windows (64-bit)): ERROR: Missing precompiled manifest for 'MyPlugin'. This module was most likely not flagged for being included in a precompiled build - set PrecompileForTargets = PrecompileTargetsType.Any; in MyPlugin.build.cs to override.
    PackagingResults: Error: Missing precompiled manifest for 'MyPlugin'. This module was most likely not flagged for being included in a precompiled build - set PrecompileForTargets = PrecompileTargetsType.Any; in MyPlugin.build.cs to override.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文