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

-
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并打包插件
-
编译比较严格,需要看报错提示补充类的前置申明以及头文件引用
|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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"classFJsonObject;//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"| -
把打包好的插件,拷贝到工程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 |publicclassMultiPlayerPlugin : ModuleRules{``publicMultiPlayerPlugin(ReadOnlyTargetRules Target) : base(Target)``{``bEnableUndefinedIdentifierWarnings = ``false``;``PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;``bUsePrecompiled = ``true``;``PublicIncludePaths.AddRange(``newstring[] {``"MultiPlayerPlugin/Public"``}``);``PrivateIncludePaths.AddRange(``newstring[] {``}``);``PublicDependencyModuleNames.AddRange(``newstring[]``{``"Core"``// ... add other public dependencies that you statically link with here ...``}``);``PrivateDependencyModuleNames.AddRange(``newstring[]``{``"CoreUObject"``,``"Engine"``,``"Slate"``,``"SlateCore"``, ``"UMG"``, ``"Http"``, ``"Json"``, ``"JsonUtilities"``, ``"Sockets"``, ``"Networking"``// ... add private dependencies that you statically link with here ...``}``);``DynamicallyLoadedModuleNames.AddRange(``newstring[]``{``// ... add any modules that your module loads dynamically here ...``}``);``}}|
Unreal Engine插件打包技巧
ChatGPT攻城狮2024-05-13 20:51
相关推荐
我的offer在哪里16 小时前
示例 Unity 项目结构(Playable Game Template)淡海水19 小时前
【节点】[Branch节点]原理解析与实际应用Zik----1 天前
简单的Unity漫游场景搭建_风华ts1 天前
创建并使用AimOffset小李也疯狂2 天前
Unity 中的立方体贴图(Cubemaps)呆呆敲代码的小Y2 天前
【Unity工具篇】| 超实用工具LuBan,快速上手使用EQ-雪梨蛋花汤2 天前
【Unity优化】Unity多场景加载优化与资源释放完整指南:解决Additive加载卡顿、预热、卸载与内存释放问题我的offer在哪里2 天前
用 Unity 从 0 做一个「可以玩的」游戏,需要哪些步骤和流程泡泡茶壶ᐇ2 天前
Unity游戏开发入门指南:从零开始理解游戏引擎核心概念Var_al3 天前
抖小Unity WebGL分包命令行工具实践指南