I am a software developer without any game engine experience and started my very first Unity project. As I use a Linux distribution (Ubuntu 20.04 LTS) and just have experience in a Java IDE (Eclipse), I had just a rough idea how this could work. I was wrong. I searched various sources on the internet until I got my first project finally running, was able to built a Linux executable and finally setup debugging the C# code of Unity. So I had no experience with Unity, none with C#, and none with game development overall. It took me a whole day to finally had a small game with full development cycle. As this was all free, I wrote this guide to help other (non-)developers to get starting with game development with Unity (on Linux). ![]()
- Install Unity
Well, this one is easy: go to the download page and click “Download Unity Hub”. This will download a file “UnityHub.AppImage”. I created a separate directory for this “Unity program” (e.g. “/Programs/Unity/”). As this is an “AppImage”, there is no need to “install” this - you can simply run it. Of course, you first have to make the file “executable” if it is not already:
chmod a+x UnityHub.AppImage
So just double click the file (or create a script with “./UnityHub.AppImage”) and Unity will start. Be patient as some actions need some time to finish.
The first time you start Unity, you will have to login with your Unity account (free) and “manage a license” by selecting the free “Personal” license.
As UnityHub is just a thin container, you also have to install a Unity engine (called “Editor”). You need to install the specific Unity Engine(s) you like. But first go to preferences (icon top right) and set in “general” a “Unity Editors Folder” to avoid install them in your user’s home directory. Then go to “Installs”, click “ADD” and select the last LTS version (e.g. “Unity 2019.4.11f1 (LTS)”); click “NEXT” and wait some minutes until it’s installed.
Finished! You installed the UnityHub and the latest Unity LTS engine. You are ready to start developing games! The following example also describes the UnityHub basics. Time to get started:
- Write your first game
Well, you have no idea where to start, right?
But thanks to noobtuts, there are absolute beginner’s tutorials. Select the “Pong Game” example and work through it. Don’t think “I never write 2D games”
, just work through this tutorial - it is perfect for beginners as it describes everything needed from scratch: the basics of the Unity Editor and what to do step by step to write this simple game. I did that with the above managed Unity LTS engine and 99% of the descriptions were accurate - only a few settings were at different places (e.g. background color) due to the different Unity versions. For now, don’t think about the standard text editor that pops up when you paste C# code. It took me about 3 hours to follow the instructions for thisPiong example, as I did this carefully and also looked into the Unity API and other ressources for better and further understanding. You could do this in probably 1 hour.
In the end, you have a working pong game - horay! ![]()
- Setup a C# editor and debugger
You noticed that the standard (Linux) editor pops up when you write C# scripts. Of course, this is not suitable for a developer as you also like to have syntax coloring, code highlighting, code completion, … and the most important: debugging facility!
I searched and tried multiple things I found on the net. E.g. multiple editors, but I finally decided to go for Visual Studio Code, because it seems to be the standard for Unity C# coding.
I do not like Microsoft and its products but all the other editors I tried had some drawbacks - especially debugging. And VSCode is at least open source and works on Linux. 
So, head over to the Visual Studio Code download page and download the “.deb” 64Bit Version. This will download a “.deb” file (e.g. “code_1.49.2-1600965325_amd64.deb”). Install this e.g. via
sudo dpkg -i code_1.49.2-1600965325_amd64.deb
As a result VSCode is installed and can be started via “/usr/bin/code”. In Unity (project), setup VSCode as your editor in
Edit > Preferences > External Tools > External Script Editor
by choosing “Browse…:” and type in /usr/bin/code - that’s it! Whenever you open a C# script, VSCode is now started.
As you open C# files (*.cs), VSCode will automatically offer to install the C# plugin - accept that. This will install C# facility in VSCode (syntax).
And now the final, most important, most problematic feature: debugging! I tried a lot (e.g. VSCode.cs) but that never worked for me.
Perhaps due to the fact that I am on Linux and not Windows. But what worked very easy and instantly was the “Debugger for Unity” plugin for VSCode:
In VSCode, press CTRL+P, paste “ext install Unity.unity-debug” and let it finish install.
Click the play/debug icon on the left pane and select “Unity Debugger” from the combo box. (If it does not appear, delete the file /.vscode/Launch.json. Restart VSCode and a new “Launch.json” will be created and “Unity Debugger” is selectable.)
Finally, we debug our C# code: set a breakpoint in your main Unity C# script’s Start() method in VSCode (as this method will be called in any case). Do not start the game in Unity yet!
Start debugging in VSCode by clicking the green triangle in the debug view’s selection box (“Unity Editor”) => VSCode is now in “debug mode”: icons appear to step in/over/out and stop, on the left side you see a “Call Stack”.
So far, VSCode is just in debug mode and is listening for Unity … next, we start in Unity our game via the standard “play” button … tadaaaa!
VSCode fill’s its “Call Stack” and “Variables” and stop at the first breakpoint! From there, use your brain (or experience) to debug your code. ![]()
Have fun! ![]()