DEV Community

Cover image for Unreal Engine 5 on Linux: compile source code + import assets from the Epic Games Launcher
David Serrano
David Serrano

Posted on • Originally published at davidserrano.io

Unreal Engine 5 on Linux: compile source code + import assets from the Epic Games Launcher

Today I bring you something a little different than usual. In addition to being a mobile programmer, I also consider myself a fan of game development and the Linux world, and the option of performing a complete Unreal Engine setup on Linux has always caught my attention.

📽 Video version available on YouTube and Odysee

Unreal Engine is one of the most famous engines for developing video games and a leader in the industry. Epic, the company behind the engine, recently announced that their latest release, Unreal Engine 5, has reached stable status. This means that it is battle tested to be used in real projects with the aim of being commercially distributed in any market.

Epic doesn't provide precompiled binaries for Linux, but luckely the engine is source available (not to be confused with open source) which means that we can have access to the source code and we can compile it by ourselves. In no case we will have the freedoms that open source grants us, but for the case that concerns us today it is more than enough.

Epic, in addition to not providing precompiled binaries for Linux, also does not provide the Epic Games Launcher; an almost essential platform to be able to download assets from the asset store. A small inconvenience that we will be able to overcome without problems.

Without further ado, here are the steps I followed to be able to download, compile and use Unreal Engine 5 on Linux, including downloading and using assets from the Unreal Engine Marketplace:

Epic Registration

First, we will have to be registered on GitHub, this is an essential requirement since we will be given access to the source code through this popular platform.

Then we are going to need an Epic account, if you don't have one go to the official Epic website and create an account for free.

The next thing will be to obtain access to the source code, Epic provides this detailed guide that explains step by step how to request said access from your dashboard. The guide talks about Unreal Engine 4 but the instructions are exactly the same for Unreal Engine 5. Just follow it step by step, it asks you to make the connection between your GitHub account to the Epic account.

Clone the source code and compile it

Now it's time to clone the repository. Go to its GitHub page and once there click on the green Code button, from which we will be given the SSH address to clone the project. Alternatively, we can also download it in the form of a zip file.

WARNING: The Unreal Engine project is a VERY large project. In my case it took several hours to download, so make sure you can leave your PC cloning the project for many hours if necessary.

github.png

Once cloned make sure you are on the release branch:

cd UnrealEngine
git checkout release
Enter fullscreen mode Exit fullscreen mode

Make sure you have the mono and clang dependencies installed.

Now we are going to run the following scripts, first Setup.sh:

./Setup.sh
Enter fullscreen mode Exit fullscreen mode

Then it's time to generate some necessary files:

./GenerateProjectFiles.sh
Enter fullscreen mode Exit fullscreen mode

And to finish we are going to compile the engine with the make command. Another important WARNING: This process can also take hours, plus the installation disk size can exceed 100 GB, make sure you have enough time and space:

make
Enter fullscreen mode Exit fullscreen mode

Here you have the official documentation of this process, which includes more details and some variants for the installation.

Open engine + Quixel

Congratulations, if you have already cloned the project and compiled it, you have passed the most tedious part of the process.

You should now be able to open the engine by running the following:

cd Engine/Binaries/Linux/
./UnrealEditor
Enter fullscreen mode Exit fullscreen mode

Quixel Megascans is a mega library of photorealistic assets provided by Epic and free to use as long as it's within the Unreal Engine. In the previous version of the engine (Unreal Engine 4) these assets were imported from the marketplace, but in Unreal Engine 5 it can be done directly from within the engine.

Create a new project and try to import a Quixel asset:

add-quixel.png

Before you can use the asset you will have to log in with your Epic account. Once downloaded, you can drag it to the world to use it:

quixel-menu.png

Note: A weird problem I had when trying to login inside the Quixel Megascans window was that I couldn't type some symbols (specifically, the @ symbol). To solve it I had to change the layout of my keyboard to US English, if it happens to you too you can try changing the layout until you find one that allows you to enter symbols.

Import marketplace assets

The last step will be to enable the Epic Games Launcher to be able to use assets from the asset store. There are several ways to do it, in my case I used Lutris, a software specifically designed for Linux that includes various technologies related to video games to make our lives easier.

On its official page you can get instructions on how to obtain it. Once downloaded open it and search for the Epic Games Launcher and download it.

lutris.png

It is possible that when you try to launch the launcher you get this error:

Your kernel is not patched for fsync. Please get a patched kernel to use fsync.

I got this error and I could solve it by installing the Liquorix kernel. Once installed I had to restart the machine and boot from the new kernel.

Now what we will have to do is create a symbolic link between the directory where we have our Unreal projects and the directory where Unreal expects to find projects.

For example, if your projects are in ~/unreal_projects:

  1. Change the name of said directory to Unreal Projects (yes, including empty spaces in a path is a crime, but it is necessary)

  2. The Epic Games Launcher expects your Unreal projects to be in Documents/Unreal Projects, so go to that folder:

cd /your/epic/games/launcher/path/drive_c/users/your_username/Documents
Enter fullscreen mode Exit fullscreen mode

Substitute your_username with your username.

  1. Create a symbolic link between the two folders:
ln -sf ~/Unreal\ Projects .
Enter fullscreen mode Exit fullscreen mode

Now open the Epic Games Launcher. You should now be able to see your Unreal projects, as well as being able to download assets from the marketplace and use them in your projects.

epic-games-launcher.png

Conclusion

These are the steps that I followed to complete the whole setup. It is possible that depending on your Linux distribution or other factors related to your machine in your case there is some extra dependency that I have not commented on here that you need. If that happens, check the links that I have been adding on the different documentation sources to see if you find the problem.

In my case, the engine works as expected, the truth is that I have only been able to invest a few hours, but so far almost everything is correct.

The only big drawback I've seen (apart from the expensive installation process) is that for some reason the engine takes forever to start. Also when I load a project it also takes a considerable amount of time. In my case I have to wait about 10 minutes to be able to have the engine open with a project loaded.

I hope this guide has been useful to you, see you ;)

Latest comments (0)