I am trying to make Unity work in Linux Mint; for now I have created a test project with the brand new 2019.3.1f1. I noticed the Ui scaling was missing in the Preferences but I guess I can do without it. The weirdest thing I noticed then is that the mouse pointer is reversed in the editor, not everywhere, not in the main and contextual menus, everywhere else it looks like this: It's also very small and imprecise. I also tried VS Code; it just doesn't work. The Visual Studio Code package is up to date but Visual Studio Code doesn't behave the same way Visual Studio does in Windows. The Unity functions like Start(), Update() and so on are just custom functions; no intellisence, no auto completion. They work though, if I write them correctly, they work in Unity but it makes the whole thing very impractical. How do Unity and Visual Studio work in WINE? I cannot use Ubuntu or Ubuntu Studio because they lag so much that they are just unusable. And I've never managed to make CentOS start. I like Linux Mint anyway.
If you're fine with paying a bit (it falls back to a perpetual license if payed for one year consecutively) then jetbrains rider is a really good cross platform IDE, that i personally can really recommend, as it feels more responsive, feature rich and customizable.
Which version of Linux Mint did you try? Yesterday I tested Unity 2019.3.1f1 with Linux Mint 19.3 and the Cinnamon desktop and I didn't notice any issue with the UI or the cursor. Overall I would say Unity with Linux Mint Cinnamon is totally usable. I have yet to try the Mate and XFCE versions of Mint, but I will.
Linux Mint 18.3 with Cinnamon. I hadn't noticed that there was a more recent one. I'm going to try 19.3 with xfce, thank you. https://linuxmint.com/download.php
VS code should work good with unity 2019.3.1f1 with Linux Mint 19.3 But i recommend using ubuntu 18.04 for unity
Installed and running! And Unity doesn't look bad at all; the mouse pointer is normal, I have managed to reinstall my preferences and layouts. The look is a bit weird because I had to reduce my sceen resolution since Linux doesn't allow screen scaling. VS Code: no intellisense. I guess it's never meant to exist for Linux, only for Mac... Here is it a first look of it, you can even see the pointer:
Well, after searching a bit, I found an extension to VS Code that brings up intellisense: Unity Game Dev Bundle. Not made by Unity but it doesn't mean that it's bad. Looks like my Unity life in Linux can begin!
I didn't try it yet. I remember getting it to work on Mac and Windows was a pain, so I expect it will be the same on Linux. You can try the following: Make sure you install VS Code before you install Unity. Go to Unity's preferences. Into External Tools select VS Code as your External Script Editor. If Unity doesn't detect VS Code then uninstall and reinstall Unity through the Hub (that's why I said you have to install VS Code before installing Unity). Open your project into Unity and then into the Asset menu choose Open C# Project. This will launch VS Code and load your whole solution. You have to wait a little for Omnisharp to start and analyses it, but once it's done Intellisence should work. I never had to install any VS Code extension to make it work with Unity. I don't know what the Unity Game Dev Bundle does, but I know it is not necessary for intellisence to work.
I have noticed that the mouse pointer problem I had only happened if I installed Unity Hub from the app store. When I use the Appimage provided here, the mouse pointer is normal. Experienced it two times, so I guess that it's not a coincidence. So I've done but I'm still getting the same error about the SDK not being installed although it is installed. There is also a recommendation about modifying a 'omnisharp.projectLoadTimeout' setting but nowhere is it mentioned where I can find this setting... If anybody knows where I can find it, I would be grateful if they passed the information on. Here is the result of the dotnet --info command: Code (CSharp): anne@MSI-GE62-6QF:~$ dotnet --info SDK .NET Core (reflétant tous les global.json) : Version: 3.1.101 Commit: b377529961 Environnement d'exécution : OS Name: linuxmint OS Version: 19.3 OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/3.1.101/ Host (useful for support): Version: 3.1.1 Commit: a1388f194c .NET Core SDKs installed: 3.1.101 [/usr/share/dotnet/sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download Do I need additional runtimes and/or SDKs?
Ok I managed to make it work. It was a pain in the ass, who would have guessed? There were actually two problems. The first one is a bug in the latest version of Unity (which isn't Linux specific). https://issuetracker.unity3d.com/is...-vscode-console-when-using-vscode-1-dot-1-4-1 To work around it: - Open Unity - In the Window menu choose Package Manager - Search for your Visual Studio Code Editor package - Downgrade to version 1.1.3 - Close Unity - Delete all your .csproj and .sln files in your project directory - Open Unity again The second problem is that VS Code on Linux require Mono, but the Mono that is packaged in Ubuntu 18 (and in Mint as well since it's based on Ubuntu) is too old. To get the latest one you need to follow the Ubuntu instruction on this page https://www.mono-project.com/download/stable/#download-lin-ubuntu I also installed some .NET stuff following the instructions on this page https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1804 I'm not sure this is required to get VS Code to work though. If you get some error then you can try it (and make sure you reboot after installing it). With this, you should be able to get VS Code working on Linux.
Thanks for your help. I've tried and installed everything you mention and eventually found the timeout settings that I set to 600 instead of 60. Still no intellisense... I get this message in VS Code when I start the project; there are quite a few exceptions at the beginning and I have not idea how to fix them. Code (CSharp): Starting OmniSharp server at 16/02/2020 à 14:41:14 Target: /home/anne/Applications/Unity Technologies/Projets Tests/Project Test (2019.3.1f1)/Project Test (2019.3.1f1).sln OmniSharp server started. Path: /home/anne/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/run PID: 190 System.TypeInitializationException: The type initializer for 'System.ComponentModel.TypeDescriptor' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /home/anne/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/lib/../lib/libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null) at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag() at Interop+Sys..cctor () [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 --- End of inner exception stack trace --- at Interop.GetRandomBytes (System.Byte* buffer, System.Int32 length) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 at System.Guid.NewGuid () [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0 at System.ComponentModel.TypeDescriptor..cctor () [0x00034] in <4bf78e13a6ea4494a3898e6a836a77f4>:0 --- End of inner exception stack trace --- at OmniSharp.Internal.CommandOptionExtensions.GetValueOrDefault[T] (McMaster.Extensions.CommandLineUtils.CommandOption opt, T defaultValue) [0x00008] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0 at OmniSharp.Stdio.StdioCommandLineApplication.get_Encoding () [0x00000] in <3d47a8ff79744e978cfdcd94f574abbe>:0 at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_1.<Main>b__1 () [0x00000] in <e77ba38e0e344004b11942d387ac8d1c>:0 at OmniSharp.CommandLineApplication+<>c__DisplayClass11_0.<OnExecute>b__0 () [0x0000b] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0 at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00039] in <344a1e8cd6594b17b1e01f8df6ae8827>:0 at OmniSharp.CommandLineApplication.Execute (System.String[] args) [0x00081] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0 at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00028] in <e77ba38e0e344004b11942d387ac8d1c>:0 at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0
I'm getting better results with Monodevelop. Unity functions like Start(), Update() and so on do not show in intellisense but the rest works more like Visual Studio for Windows. Not optimal but... Maybe someone will help fixing the problem once?
All right, Monodevelop is working properly (it works exactly like in the old Roll A Ball tutorial): autocompletion works, except for the main Unity functions (Start(), Update(), OnTriggerEnter() and so on). I think I can do with(out) it.
In my case when i upgrade unity to from 2020.3 to 2021.3 I had similar issue and had open my package manager and display the little arrow at the bottom and clicked Manual Resolve. It takes some time but everything works fine after that.