Unreal Engine插件打包技巧

  1. 打开UE工程,点击编辑,选择插件,点击"打包"按钮,选择输出目录

  2. UE4.26版本打包提示需要VS2017问题解决 1)用记事本打开文件【UE4对应版本安装目录\Epic Games\UE_4.26\Engine\Build\BatchFiles\RunUAT.bat】

    2)搜索【%UATExecutable% %* %UATCompileArg%】并删除本行

    3)在本行添加【%UATExecutable% %* -VS2019=true %UATCompileArg%】

    4)保存并关闭文件

    5)重启UE4并打包插件

  3. 编译比较严格,需要看报错提示补充类的前置申明以及头文件引用

    |-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | //head文件 #include "CoreMinimal.h" #include "Subsystems/GameInstanceSubsystem.h" #include "Runtime/Online/HTTP/Public/Http.h" #include "Engine/EngineTypes.h" #include "VRVIUOnlineGameSubsystem.generated.h" class FJsonObject; //cpp文件 #include "VRVIUOnlineGameSubsystem.h" #include "Kismet/GameplayStatics.h" #include "SocketSubsystem.h" #include "Engine/World.h" #include "TimerManager.h" #include "Serialization/JsonReader.h" #include "Serialization/JsonWriter.h" #include "Serialization/JsonSerializer.h" |

  4. 把打包好的插件,拷贝到工程plugins目录下,删除private源码文件夹,修改".Build.cs"文件,添加编译条件bUsePrecompiled

    |----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | public class MultiPlayerPlugin : ModuleRules { ``public MultiPlayerPlugin(ReadOnlyTargetRules Target) : base(Target) ``{ ``bEnableUndefinedIdentifierWarnings = ``false``; ``PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; ``bUsePrecompiled = ``true``; ``PublicIncludePaths.AddRange( ``new string[] { ``"MultiPlayerPlugin/Public" ``} ``); ``PrivateIncludePaths.AddRange( ``new string[] { ``} ``); ``PublicDependencyModuleNames.AddRange( ``new string[] ``{ ``"Core" ``// ... add other public dependencies that you statically link with here ... ``} ``); ``PrivateDependencyModuleNames.AddRange( ``new string[] ``{ ``"CoreUObject"``, ``"Engine"``, ``"Slate"``, ``"SlateCore"``, ``"UMG"``, ``"Http"``, ``"Json"``, ``"JsonUtilities"``, ``"Sockets"``, ``"Networking" ``// ... add private dependencies that you statically link with here ... ``} ``); ``DynamicallyLoadedModuleNames.AddRange( ``new string[] ``{ ``// ... add any modules that your module loads dynamically here ... ``} ``); ``} } |

相关推荐
Artistation Game1 天前
九、怪物行为逻辑
游戏·unity·游戏引擎
妙为1 天前
unreal engine5制作动作类游戏时,我们使用刀剑等武器攻击怪物或敌方单位时,发现攻击特效、伤害等没有触发
游戏·游戏引擎·虚幻·碰撞预设
dangoxiba1 天前
[Unity Demo]从零开始制作空洞骑士Hollow Knight第十三集:制作小骑士的接触地刺复活机制以及完善地图的可交互对象
游戏·unity·visualstudio·c#·游戏引擎
red_redemption2 天前
cpp,git,unity学习
git·unity·游戏引擎
tealcwu2 天前
【Unity踩坑】Unity更新Google Play结算库
unity·游戏引擎
先生沉默先2 天前
unity 默认渲染管线材质球的材质通道,材质球的材质通道
unity·游戏引擎·材质
一个程序员(●—●)3 天前
Unity各个操作功能+基本游戏物体创建与编辑+Unity场景概念及文件导入导出
unity·游戏引擎
yukino_NZB4 天前
Unity网络开发记录(三):封装服务端的相关socket
网络·unity·游戏引擎
向宇it4 天前
【unity进阶知识6】Resources的使用,如何封装一个Resources资源管理器
开发语言·游戏·unity·游戏引擎
dangoxiba5 天前
[Unity Demo]从零开始制作空洞骑士Hollow Knight第十一集:制作法术系统的回血机制和火球机制
unity·游戏引擎