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 ... ``} ``); ``} } |

相关推荐
云手机掌柜41 分钟前
Tumblr长文运营:亚矩阵云手机助力多账号轮询与关键词布局系统
大数据·服务器·tcp/ip·矩阵·流量运营·虚幻·云手机
三只坚果1 天前
blender制作动画导入unity两种方式
unity·游戏引擎·blender
YF云飞1 天前
Unity音频管理:打造沉浸式游戏音效
游戏·unity·游戏引擎·游戏程序·个人开发
与火星的孩子对话1 天前
Unity高级开发:反射原理深入解析与实践指南 C#
java·unity·c#·游戏引擎·lucene·反射
scoone1 天前
开源游戏引擎Bevy 和 Godot
游戏引擎·godot
霸王•吕布2 天前
游戏引擎中的粒子系统
游戏引擎·粒子系统·粒子发射盒·粒子物理参数·粒子实例·粒子生命周期·粒子参数
小徐小徐编程不急2 天前
unity实现背包拖拽排序
unity·游戏引擎
萘柰奈2 天前
Unity进阶--C#补充知识点--【Unity跨平台的原理】Mono与IL2CPP
unity·c#·游戏引擎
阿赵3D2 天前
Unity引擎播放HLS自适应码率流媒体视频
unity·游戏引擎·音视频·流媒体·hls
郝学胜-神的一滴2 天前
Three.js 材质系统深度解析
javascript·3d·游戏引擎·webgl·材质