Linux Guide, Workflow, Tools, Improvements

Linux guide covering initial setup as well as Workflow, Tools, and Improvements.

After a bit of trouble getting everything setup on Linux, there was no way to update the wiki since it has been locked since May 2018. I figured a Thread in the Forums to get this information organized would be a good idea.

I am currently using Unreal Engine 4.22.3 with Codelite 13, After installing the appropriate pull requests the codelite plugin and Hot Reloading are both working properly.

First here is the quick copy and paste commands to get up and running, I purposely based this on the 4.22.3-release tag, because Yaakuro’s HotReload patch does not appear to work with 4.23, however I will revisit this thread and update it as I test and confirm that codelite plugin and hotreload work in newer version of Unreal Engine:



sudo apt-get install codelite
mkdir ~/source
cd ~/source
git clone --branch 4.22.3-release https://github.com/EpicGames/UnrealEngine
cd UnrealEngine
git pull origin pull/4992/head
git pull origin pull/6141/head
./Setup.sh
./GenerateProjectFiles.sh
make


To launch the editor:


~/source/UnrealEngine/Engine/Binaries/Linux/UE4Editor

If you do not have Vulkan Drivers, or your systems graphics card does not support Vulkan you can start in opengl mode:


~/source/UnrealEngine/Engine/Binaries/Linux/UE4Editor -opengl4

you can also launch the editor directly to a specific project, for a quicker load of the editor:


~/source/UnrealEngine/Engine/Binaries/Linux/UE4Editor ~/game/unreal/game1/game1.uproject -opengl4

If creating system Icons/launchers in your start menu you can use the above commands, just set the working directory to this:


~/source/UnrealEngine/Engine/Binaries/Linux

Available c++ source code Accessors are listed here: https://wiki.unrealengine.com/Runnin…Code_Accessors

I tried to research the available code Accessors that work with UE4, the main contenders appeared to be codelite, qtcreator, clion. I ruled out clion because it costs money, however I have heard great things about it from others. that left me with the choice between codelite and qtcreator. I ended up going with codelite because it is easily extended so that it can work more closely with Unreal Engine.

The first issue I ran into was the codelite plugin currently included with Unreal Engine does not work. The fix provided by Yaakuro as a pull request fixes this problem and has been working without issue for me: https://github.com/EpicGames/UnrealEngine/pull/4992

The plugin allows me to double click the C++ files from within Unreal Engine and have them open in the Codelite IDE c++ editor.

Once you actually have a working codelite plugin installed/built you only need to enable it in the settings:

The second issue I ran into was HotReloading was not working, and development is horribly slow without it! Yaakuro also provided a pull request for this problem, although one of the lines that needs edited actually changed files, and so his pull request currently shows conflicts, but with manual intervention works great: https://github.com/EpicGames/UnrealEngine/pull/5287

I created a pull request based on Yaakuro’s work with the 4.22 conflict resolved (one of the lines changed from UnrealBuildTool.cs to HotReload.cs): https://github.com/EpicGames/UnrealEngine/pull/6141

Hot Reloading allows you to modify a c++ file and click build within Codelite, or another IDE or make program, and then all you have to do is hit the Play button again in Unreal and see the changes instantly, without the need to relaunch Unreal Editor.

I have applied both of these fixes to my repository: https://github.com/linux-gnux-ue4/UnrealEngine

Other UnrealEngine forks with linux fixes:
https://github.com/PhilBax/UnrealEngine
https://github.com/yaakuro/UnrealEngine

A way to find the fix that you need is to go to the main UnrealEngine repository: https://github.com/EpicGames/UnrealEngine then click on pull requests, then in the filters box add the search terms to solve the problem your facing, such as “codelite” or “hotreload”:

I am now able to get started developing, which admittedly will begin with working my way through some Unreal Tutorials so I can become more familiar with Unreal Engine.

I am curious to know what other great fixes other users may have created, especially after seeing that great pull requests often get ignored.

If you have some great updates for Unreal Engine on Linux, please tell me about it and Link your repository here. I appreciate it!

I added some more info on how to find the fixes you need directly, by searching the active pull requests on github.

Also if anybody needs help with getting something working on Linux, let me know and I will try and help if its something I am familiar with.