DEV Community

Cover image for I Got My Windows-Only Unreal Engine Plugins Running on Linux! Here's the Full Story πŸ§πŸš€
taku25
taku25

Posted on

I Got My Windows-Only Unreal Engine Plugins Running on Linux! Here's the Full Story πŸ§πŸš€

Hey everyone! I usually develop a suite of Neovim plugins for Unreal Engine in a Windows environment. But deep down, I've always had this thought nagging at me: "I really want to replicate this dev setup on my favorite OS, Linux!"

So, this is the complete story of how I finally made my plugin suite compatible with Linux. If you're at all interested in a "Neovim + Unreal Engine on Linux" workflow, I think you'll enjoy this ride!

The First Big Hurdle: Where in the World is the Engine? πŸ€”

The very first thing my plugins need to do is look at a .uproject file and figure out which version of Unreal Engine it's linked to.

This is all handled by the EngineAssociation key inside the .uproject file.

{
    "EngineAssociation": "5.6"
}
Enter fullscreen mode Exit fullscreen mode

On Windows, this was easy. The OS keeps a neat record in the registry that maps IDs like "5.6" to the actual engine installation path.

But on Linux? There's no Epic Games Launcher, and the engine just runs from a folder you unzip yourself. So where was this crucial mapping information stored? This was the first, and biggest, hurdle.

The "Aha!" Moment: It Was Hiding in Plain Sight! πŸ’‘

I figured, "If I don't know, I'll just have to find it!"

So, I decided to go all-in and set up a dual-boot with Fedora to create a true, native Linux development environment. After getting that running, I installed Unreal Engine and started hunting through my home directory, using fzf and rg to search relentlessly for anything that looked promising. And then...

I found it!

~/.config/Epic/UnrealEngine/Install.ini

I opened the file, and there it was:

[Installations]
UE_5.6=/path/to/my/UnrealEngine_5.6.1
Enter fullscreen mode Exit fullscreen mode

Bingo! πŸŽ‰
The exact mapping between the Engine ID and the installation path I was looking for, hiding in this simple config file all along.

The Fix: Time to Get Scripting! πŸ‘¨β€πŸ’»

Once the mystery was solved, implementing the fix was surprisingly straightforward. All I had to do was:

  1. Create a find_engine.sh script to parse this .ini file, as a replacement for the Windows .bat file.
  2. Modify the plugin's Lua code to detect the OS and call the new .sh script when on Linux.

With just those changes, the main plugins (UEP, UCM, ULG) started working smoothly. UBT.nvim needed a little extra work since it handles the build process, but that was also solved by adding another simple shell script.

Of Course, There Are Still a Few Wrinkles... (The Work Continues)

It's not quite perfect yet. There are still a couple of small issues I need to iron out:

  1. generateheader Doesn't Work: This mode for the Unreal Build Tool (UBT) throws an error on Linux. It looks like I'll have to bypass UBT and call the Unreal Header Tool (UHT) directly.
  2. ushell is Missing: The convenient ushell command-line tool wasn't included in the UE 5.6.1 zip I downloaded. I'm wondering if it was present in 5.6.0. I'll have to investigate this later.

Final Thoughts

Man, it's just so much fun developing in a terminal-first environment like Linux! Taking on this challenge and getting it to work has brought me one step closer to my ideal development setup.

What's next... Mac support, maybe? (Though I'll have to confront the memory limitations of Apple Silicon first, so that might be a ways off! haha)

I hope this story can help someone else out there who's thinking about doing the same thing.
My plugins are open-source on GitHub, so feel free to check them out! A star would absolutely make my day!

[Link to your GitHub Repository Here]

Thanks for reading! Happy coding! πŸš€


This Week's Changelog πŸ“

  • Global
    • Full Linux compatibility! 🐧
  • UCM.nvim
    • Improved the logic for generating include paths to headers.
  • UEP.nvim
    • Smoothed out the tree behavior during a Refresh.
    • The .uproject file itself is now shown in the project tree.
    • Now correctly recognizes plugins under the Platform and Programs directories!

Top comments (0)