Reputation: 9
I just installed Elementary OS as operating system. Then I installed Unity. I also installed VS Code as the script editor for Unity. Afterwards, I installed the .Net 5 and Mono 6 SDKs for Unity again, but when I entered VS Code, even though .Net was installed (The .NET Core SDK cannot be located .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path) error. I did a lot of research but couldn't find any solution. C# and Unity Debugger are installed as extensions. I'll be happy if you can help me. Thank you in advance.
Upvotes: 1
Views: 3974
Reputation: 11
I found the solution after days and days. I almost got mad!
Beside of the dotnet, mono and all the things that you have to install. Don't install VS code from FlatPak if you're using Ubuntu (I guess any Linux at this point) Install it from the original source code
In Unity go on Windows-> Package Manager -> Unity Registry and install Visual Studio Code Editor because Unity itself installs Visual Studio EDITOR. At the time that I'm writing that we have the version 1.2.5.
After that close everything, reopen it and MAGIC, you can set it up from your Edit->Preferences->External Editor!
Now, in order to check if everything is working perfectly. -Open Visual studio -Install Unity Debugger in extension ( I have the deprecated version and it works) -Close VS code -Open any script from unity
In VS code open the output console and on the right select OmniSharp Log OUTPUT OmniSharp If it's building things and doesn't create problems your VS code should work perfectly
I'm having only Received response for /v2/getcodeactions but could not find request. I'm sorting out that right now but it works anyway
Upvotes: 1
Reputation: 109
I tried https://stackoverflow.com/a/62748238 and it worked for me.
As for unity development I highly recommend rider on linux platform to debug unity script. I tried vs code and can't set breakpoint successfully.
On windows I use visual studio(visual studio and vscode are two different IDE) to debug unity script.
Upvotes: 1