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!

相关推荐
zhangzhangkeji10 小时前
UE5 材质-5:砖缝不透明材质系列,掩码节点 ComponentMask,材质函数 CustomRotator 旋转UV,
ue5
AA陈超1 天前
虚幻引擎5 GAS开发俯视角RPG游戏 P05-08 UI 部件数据表
c++·游戏·ue5·游戏引擎·虚幻
ricky6758 天前
[Linux]Linux系统的20个实用命令详解
ue5
AA陈超9 天前
虚幻引擎5 GAS开发俯视角RPG游戏 P05-01.创建游戏玩法标签
c++·游戏·ue5·游戏引擎·虚幻
reddingtons10 天前
场景美术师的“无限画板”:UE5中非破坏性的材质混合(Material Blending)工作流
ue5·材质·设计师·技术美术·游戏策划·游戏美术·substance
m0_5522008210 天前
《UE5_C++多人TPS完整教程》学习笔记61 ——《P62 武器开火特效(Fire Weapon Effects)》
c++·游戏·ue5
努力的小钟10 天前
UE5 GAS GameAbility源码解析 EndAbility
ue5
AA陈超10 天前
虚幻引擎5 GAS开发俯视角RPG游戏 P05-04 使用效果应用游戏标签
c++·游戏·ue5·游戏引擎·虚幻
zhangzhangkeji10 天前
UE5 测量 -1,长度测量:P2制作定位球与定位线,P3制作射线检测节点,P4在鼠标位置生成定位球
ue5
AA陈超11 天前
虚幻引擎UE5专用服务器游戏开发-33 在上半身播放组合蒙太奇
c++·游戏·ue5·游戏引擎·虚幻