[SOLVED] Unity with VS Code and intellisense on Linux Mint

Hi,
Which c# script editor with Intellisense capabilities are you using with Unity Editor on Linux?
Thanks

3 Likes

I found one: VS Code
I did these steps to make it work with Itellisense in Linux Mint 20 Cinnamon (son of Ubuntu 20.04):

  1. I assume you already have Unity Editor running with the latest nvidia drivers
  2. Install VS Studio from .deb file (Running Visual Studio Code on Linux)
  3. Open VS Code and install de C# extension OmniSharp (you will be asked to install it when you open VS Code). After tah close VS Code
  4. Install .net SDK from here: https://docs.microsoft.com/es-es/dotnet/core/install/linux-ubuntu#2004-
  5. Install latest Mono release (Ubuntu 20.04): Redirecting…
    But the next line must be changed:
    deb https://download.mono-project.com/repo/ubuntu vs-focal main
    for this one:
    deb [arch=amd64] https://download.mono-project.com/repo/ubuntu vs-focal main

(just added [arch=amd64] )

  1. Open VS Code, go to menu File - Preferences - Settings - Extension - C# configuration
    look for “Omnisharp: Use Global Mono”, and set it to “always”.
  2. Close VS Code
  3. Go to Unity menu Edit - Preferences - External Tools - External Script Editor, and pick “Visual Studio Code”
    7.In the same window, check “Embedded packages”, “Local packages”, “Built-in packages”, “Git packages” and after click on “Regenerate project files”

Hope it helps

49 Likes

Thanks for sharing !!! It’s working fine for my in Debian 10 !! Thanks very much! :slight_smile:

2 Likes

Thank you very much! I got everything right up to forcing global mono and regenerating the project files, I would never have figured that out on my own.

Many thanks! Every other source I could find says to set “Omnisharp: Use Global Mono” to "Never" for some reason. After several hours of frustration, you have saved my day.

THANK YOU!!!

Figured all that out myself, after spending an hour of research and tweaking stuff, and than finally found your post and screamed, Nooooaaahh. Thanks, very

Wow @fran_m what a goat! I was almost giving up on my own research until I just googled a super generic “unity coding linux” and found this post. Worked like a charm!

You are the BOSS !

Thanks a lot its working

Thank you so much!

I keep coming back to this post to setup Unity on any new Linux Mint installation. Thanks a bunch @fran_m!

Thank you very much, BOSS :slight_smile:

Thanks! Working on Pop OS! (ubuntu-based) with Unity 2022 Beta!

You are a hero. These instructions should be in the official doc. Thanks!
Tested with Zorin Lite.

fran_m… I owe you a beer!!!

Thank you so much!

Hi everyone! I followed the steps but I get these error messages on Pop_OS!

I get this in Unity when trying to open a script:
8014547--1031684--DotnetMonoError.png

And when clicking OK it opens VS Code, where I’m greet with this other message:
8014547--1031687--SDK_VSCode.png

I do have Mono and Dotnet installed. I’m new to Linux so I really don’t know what to do here.

Anybody got the same issue?

Aparently this is an error from the Unity Debugger extension, if you have installed VsCode trough flatpak i strongly recommend you to install the .deb version, either from Microsoft’s website or Pop Shop. For VsCode and other IDEs in general it’s easier to use the native version, it just work out-the-box.

I think this is because VsCode was installed via flatpak, maybe it isn’t detecting the .net install since flatpak apps are contained from the rest of the system.

Hi, thanks for the answer! I did install VS code from Pop Shop first but in that case I get this error:
8019113--1032599--Screenshot from 2022-04-04 13-43-11.png

Even though I do have VS Code installed, that’s why I tried with the flatpak version instead.
In Preferences > External Tools, I have “code” selected as my main editor but that was auto completed. I couldn’t actually find the editor by browsing, maybe Unity is looking for it in the wrong place?
I’m new to linux so I don’t really know how to check :frowning: