UE5.3 虚幻引擎 Linux ubuntu插件开发打包

Linux is not my strength so perhaps some of this is obvious to more experienced Linux users, but I couldn't seem to find the answers laid out in a nice easy do this then that so hopefully everyone else can benefit from my last few days of bashing my head against a wall.

So first, you need to do a custom build of UE4 for Ubuntu. I know this sounds scary, but Epic really did a good job laying this one out. Just follow their step-by-step instructions in the documentation:

docs.unrealengine.com

Linux Quick Start

Learn how to download, build, and run UE4 on Linux.

It is big, and it will take a while. I just let it build overnight.

Now if you're just doing Blueprints, then you're good to go, but that's not why you're reading this are you? I pulled my project off of SVN (RabbitVCS is a good Ubuntu equivalent to Tortoise SVN on Windows) so I'm starting with a clean copy of my code and no intermediate files leftover from other platforms (Build, Config, Content, Plugins, Source, and your .uproject file).

Plugins

If you don't use any custom plugins OR any marketplace plugins, you can skip to the Main Project section.

I've had a complicated relationship with plugins. In UE4.26 I put all my custom AND marketplace plugins in a separate project (basically an empty project) in the Plugins subfolder. You're going to need to recompile all of them to match your custom build of UE4. To help with this, I use a bash script (the Linux equivalent of .bat files in Windows) by creating a new file next to my plugin .uproject file that I creatively called BuildLinuxPluginsScript. You can use gedit for a notepad equivalent text editor to modify it:

复制代码
#!/bin/bash

bash /home/user/Documents/UnrealEngine-4.26/Engine/Build/BatchFiles/RunUAT.sh BuildPlugin -Plugin="/home/user/Documents/Unreal Projects/MyPlugins426/Plugins/KantanCharts/KantanCharts.uplugin" -Package="/home/user/Documents/Unreal Projects/MyPlugins426/Package/KantanCharts" -CreateSubFolder -TargetPlatforms=Linux

(Duplicate the last line and update each one for every custom and marketplace plugin you have). Save your file, then at a terminal, use the command chmod +x BuildLinuxPluginsScript. You can now execute your script from the terminal using ./BuildLinuxPluginsScript and if all goes well, you should have a Package subdirector of your project with each plugin in its respective subfolder. Within each plugin subfolder should be at least a Binaries, Intermediate, Resources, and Source folders, and a .uplugin file. If there isn't, you may need to go back to your plugin source file, edit the .uplugin file with a text editor and in the "Modules" section add a WhitelistPlatforms so it looks like this:

复制代码
"Modules": [
		{
			"Name": "MyCustomPlugin",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"WhitelistPlatforms": [
				"Linux"
			]
		}
	]

If Linux is already in the list, try removing other platforms listed there. Sometimes the tools can be grumpy about that. Run your BuildLinuxPluginsScript again.

Once all your plugins are built, copy the packaged folders into your custom engine build. In my case they all go in /home/user/Documents/UnrealEngine-4.26/Engine/Plugins

Main project

Now your engine is loaded up with any of the plugins you need, now onto the main project. If you're your plugins were C++ or you had marketplace plugins, but the rest is blueprint then you're probably good to go. However, if your main project is also C++ then you'll probably get an error about modules (your main project) being out of date and would you like to rebuild. On windows, you just say yes and it works. On Linux, not so much. Again I make a new bash file which I called LinuxGenerateProjectFiles with the following contents:

复制代码
#!/bin/bash

bash /home/user/Documents/UnrealEngine-4.26/Engine/Build/BatchFiles/Linux/RunMono.sh /home/user/Documents/UnrealEngine-4.26/Engine/Binaries/DotNET/UnrealBuildTool.exe -makefile -project="/home/user/Documents/Unreal Projects/MyProject/MyProject.uproject" -game

And again chmod +x LinuxGenerateProjectFiles. Now it's important that your project is cleaned up before you run this. If you have any plugins that you already built and installed to the engine with the previous step, remove them otherwise they'll be "discovered" as part of this process and added to the make process. As a precaution, I also remove an intermediate and binaries folders. Now you can run this script with ./LinuxGenerateProjectFiles . After a few minutes you should have a whole bunch of new files in your project directory, but the important one here is the make file. One last command from the terminal: make MyProjectEditor (where you replace "MyProject" with your project name eg "YourProjectEditor"). The make file has a whole lot of different things it can do, but this one seems to be the key to opening your project. After that process finishes, you should be able to just double click on your project and it will start loading!

One last note, if you've never loaded a UE4 project on your machine before, or even the first time loading a new project, depending on the size of your project it can take quite a while. I'm working with a fairly large project and the first time it took almost 30 minutes to open so be patient! After the first time, it usually only takes my project a minute or so to load. Good luck!

相关推荐
吴梓穆3 天前
UE5 UI遮罩
ue5
枯萎穿心攻击3 天前
Unity VS UE 性能工具与内存管理
开发语言·游戏·unity·ue5·游戏引擎·虚幻·虚幻引擎
黑客影儿3 天前
使用UE5开发2.5D开放世界战略养成类游戏的硬件配置指南
开发语言·c++·人工智能·游戏·智能手机·ue5·游戏引擎
幻雨様3 天前
UE5多人MOBA+GAS 54、用户登录和会话创建请求
android·ue5
吴梓穆4 天前
UE5 InVideo插件 使用
ue5
DongDongBaJiaYou4 天前
UE5打包,LoadObject加载不出网格|动画
ue5·ue4·虚幻·虚幻引擎
曹勖之4 天前
UE5关卡蓝图能不能保存副本呀?
ue5
枯萎穿心攻击4 天前
从 Unity UGUI 到 Unreal UMG 的交互与高效实践:UI 事件、坐标系适配与性能优化
开发语言·ui·unity·性能优化·ue5·游戏引擎·虚幻引擎
DongDongBaJiaYou6 天前
Blender模型动画导入到UE5
ue5·blender
会思考的猴子8 天前
UE5 PCG 笔记(二) Difference 节点
笔记·ue5