Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question How to get rid of "The dotnet and mono6 SDK extensions are required.." message?

Discussion in 'Linux' started by evilblade, Jan 6, 2023.

  1. evilblade

    evilblade

    Joined:
    Jan 6, 2023
    Posts:
    1
    Hey folks!

    I'm using the Flatpack version of Unity here and everytime I want to edit some script I get this "The dotnet and mono6 SDK extensions are required for the Unity debugger to work. Please install it from Flathub." message.
    I've installed them with
    flatpak install org.freedesktop.Sdk.Extension.dotnet6
    and
    flatpak install org.freedesktop.Sdk.Extension.mono6
    commands and they intalled and appeared under "Installed" programs section in Discover..
    But that changed NOTHING! :(
    I'm still getting this annoying message EVERY time..
    So.. can anyone here help me?
    If I can't make this debugger thing to work maybe there's a way to disable this message somehow?

    Thanks in advance.
     
    Moezinger likes this.
  2. Moezinger

    Moezinger

    Joined:
    Dec 3, 2018
    Posts:
    4
    HI!

    I'm very new to Linux, I ran into the same issue and have been going in circles for a while trying to resolve this.

    Here's what I've found so far.

    Bear in mind that this info is limited to my current understanding of how Linux distributions work.

    At first I tried the Flatpak approach which delved me into a rabbit hole of errors and unmet dependencies that I didn't understand or have the capacity to deal with.

    As far as I understand Flatpacks are unofficial versions of programs which run in a sort of "shell" which emulates the way the program or app might run on Windows, similar to what Wine does with games, again I might be wrong here, but I can tell you for sure that the VS CODE app from flathub is not the official version, it even gives you a text editor warning when you open the program.

    Unity doesn't require mono6 and .Net SDK's to run, those are for VS Code, it needs them to run scripts, debug, and I don't really know what else, but I'm guessing much more.

    So far, I've found that if I install VS Code from Snap (snapcraft.io), along with the .Net SDK from the same source + the mono libraries from the official site (mono-project.com) then VS code will run without issues after a reboot. (You have to reboot in order for the icon to show up in app launcher.)

    Furthermore, in VS code on the left side, you should find the extension page which will take you to a list of possible extensions you can install for it, one of them is the C# extension, be sure to install that as well.

    Now if you execute a C# script inside the Unity Editor it will prompt you to select Visual Studio Code from a list of IDE's.

    In Unity Hub, for the version of the Editor you are using, make sure you have Windows Build Support(mono) installed.

    When you open the Unity Editor, under Edit, preferences, external tools, External Script Editor, select, open by file extension.

    That's it, now if you run a script inside the editor it will run in VS code without issues.


    I did all of this on Pop! OS , best wishes and I hope this helps.
     
  3. Moezinger

    Moezinger

    Joined:
    Dec 3, 2018
    Posts:
    4
    Here's a faster way that I've found today.

    It would be best to make sure that there are no mono/sdk/vs code packages installed on your system beforehand.

    Get Visual Studio Code from here: https://code.visualstudio.com/ Depending on the distro you're running select either .deb or .rpm , just run the package after download.

    Install .net sdk from here : https://dotnet.microsoft.com/en-us/download/visual-studio-sdks , find your distro in the list and follow the instructions line by line, take care and read the warnings, some installation methods have additional problems.

    You'll want to go for the 6.0 version.

    To verify installation in terminal you can write dotnet --list-sdks and dotnet --list-runtimes. This should show you the current versions of sdk and runtime and the directory where they are installed.

    Install Mono from here: https://www.mono-project.com/download/stable/ , after going through the steps, in my case it was enough to just install mono-devel.

    With these done correctly, you can follow the steps in this video to see if vscode runs as it should. + how to install the C# Plugin:



    (The video is a bit old, but it still works more or less the same, the only difference is that you have to type in "dotnet new console" instead of just dotnet new.)

    Finally, in your Unity Editor, before you run a C# Script make sure you have "open by file extension" selected under Edit > Preferences > External Tools > External Script Editor ( Top right menu bar, make sure you save after changing it. )

    Again, this worked for me on v.22.04 Pop! OS the steps are interchangeable with the same version of Ubuntu.

    I hope this helps, best of luck!
     
    Last edited: Feb 28, 2023
    alexvlad789 likes this.