Set up Visual Studio Code for Unity in Linux
Recently I have been trying to move Linux and prefer it more than Windows. So I had to find a way to make Unity work in Linux.
I have got this resources from here and here; and tried to compile it here. Yes, there a are quite a few steps, but it was relatively straight froward.
Step 1: Install Visual Studio Code (https://code.visualstudio.com/docs/setup/linux)
Step 2 : Install .Net SDK stuff. Just follow this link(https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial), type 4 or 5 commands and you are done with .Net stuff.
Step 2.1 : Install/Update Mono so that VS Code can work with it by default. I had some issues regarding this. https://www.mono-project.com/download/stable/#download-lin
Step 3 : Change your code editor preference in Unity. Unity->preferences->External tools: /usr/bin/code



Step 4 : In unity go to Assets ->Open C# Project (to make sure c# project is generated if it was not the case)
Step 5 : In Visual Studio Code, you should get a popup(bottom-right) saying: The ‘C#’ extension is recommended for this file type. Install that or find it under Extensions (Ctrl+Shift+X) and install it.
You can also install it manually : Search for Unity in Extensions (Ctrl+Shift+X) and install Debugger for Unity, go to the debug button (left side) and make sure the Debug target is set to “Unity Editor”.
You are done!