Search Unity

Feedback Linux Mint + Unity = ?

Discussion in 'Linux' started by Deleted User, Feb 13, 2020.

  1. Deleted User

    Deleted User

    Guest

    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:

    mouse-pointer-128.png
    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. :)
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    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.
     
  3. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    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.
     
  4. Deleted User

    Deleted User

    Guest

    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
     
  5. Deleted User

    Deleted User

    Guest

    How is VS Code working for you?
     
  6. volfase

    volfase

    Joined:
    Nov 15, 2016
    Posts:
    42
    VS code should work good with unity 2019.3.1f1 with Linux Mint 19.3
    But i recommend using ubuntu 18.04 for unity
     
  7. Deleted User

    Deleted User

    Guest

    I already said that I cannot use Ubuntu.
     
  8. Deleted User

    Deleted User

    Guest

    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:

    Capture d’écran_2020-02-14_02-06-28.png
     
  9. Deleted User

    Deleted User

    Guest

    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! :)

     
  10. Deleted User

    Deleted User

    Guest

    Disappointed, intellisense doesn't recognise Debug... :sigh:
     
  11. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    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.
     
  12. Deleted User

    Deleted User

    Guest

    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):
    1. anne@MSI-GE62-6QF:~$ dotnet --info
    2. SDK .NET Core (reflétant tous les global.json) :
    3. Version:   3.1.101
    4. Commit:    b377529961
    5.  
    6. Environnement d'exécution :
    7. OS Name:     linuxmint
    8. OS Version:  19.3
    9. OS Platform: Linux
    10. RID:         linux-x64
    11. Base Path:   /usr/share/dotnet/sdk/3.1.101/
    12.  
    13. Host (useful for support):
    14.  Version: 3.1.1
    15.  Commit:  a1388f194c
    16.  
    17. .NET Core SDKs installed:
    18.  3.1.101 [/usr/share/dotnet/sdk]
    19.  
    20. .NET Core runtimes installed:
    21.  Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
    22.  Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
    23.  
    24. To install additional .NET Core runtimes or SDKs:
    25.  https://aka.ms/dotnet-download
    Do I need additional runtimes and/or SDKs?
     
  13. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    I toyed with VS Code on Linux today. Didn't manage to get intellisence to work.
     
  14. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    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.
     
    Last edited: Feb 16, 2020
    xiconaldo, Lava_Key, DEPT-AU and 2 others like this.
  15. Deleted User

    Deleted User

    Guest

    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):
    1. Starting OmniSharp server at 16/02/2020 à 14:41:14
    2.     Target: /home/anne/Applications/Unity Technologies/Projets Tests/Project Test (2019.3.1f1)/Project Test (2019.3.1f1).sln
    3.  
    4. OmniSharp server started.
    5.     Path: /home/anne/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/run
    6.     PID: 190
    7.  
    8. 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)
    9.   at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
    10.   at Interop+Sys..cctor () [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0
    11.    --- End of inner exception stack trace ---
    12.   at Interop.GetRandomBytes (System.Byte* buffer, System.Int32 length) [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0
    13.   at System.Guid.NewGuid () [0x00000] in <a1ae6166591d4020b810288d19af38d4>:0
    14.   at System.ComponentModel.TypeDescriptor..cctor () [0x00034] in <4bf78e13a6ea4494a3898e6a836a77f4>:0
    15.    --- End of inner exception stack trace ---
    16.   at OmniSharp.Internal.CommandOptionExtensions.GetValueOrDefault[T] (McMaster.Extensions.CommandLineUtils.CommandOption opt, T defaultValue) [0x00008] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0
    17.   at OmniSharp.Stdio.StdioCommandLineApplication.get_Encoding () [0x00000] in <3d47a8ff79744e978cfdcd94f574abbe>:0
    18.   at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_1.<Main>b__1 () [0x00000] in <e77ba38e0e344004b11942d387ac8d1c>:0
    19.   at OmniSharp.CommandLineApplication+<>c__DisplayClass11_0.<OnExecute>b__0 () [0x0000b] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0
    20.   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00039] in <344a1e8cd6594b17b1e01f8df6ae8827>:0
    21.   at OmniSharp.CommandLineApplication.Execute (System.String[] args) [0x00081] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0
    22.   at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00028] in <e77ba38e0e344004b11942d387ac8d1c>:0
    23.   at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <b9a15b8fd5014eba82f8b76ad9587cd4>:0
     
  16. Deleted User

    Deleted User

    Guest

    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?
     
  17. Deleted User

    Deleted User

    Guest

    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. ;)

    Screenshot_2020-02-18_18-44-19.png

    Screenshot_2020-02-18_18-46-46.png
     
  18. mateuszwallace

    mateuszwallace

    Joined:
    Dec 13, 2019
    Posts:
    17
    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.