简体   繁体   中英

Unity/C# autocomplete not working in Visual Studio Code for Linux with .NET version 6.x

I can't get IntelliSense in to autocomplete or show suggestions for Unity (20.3.30 LTS) methods in Visual Studio Code in Linux (Ubuntu 20.04). I have downloaded .NET version 6.0.102 on my Ubuntu but the Unity API Compatibility Level only goes as high as 4.x, which is subsequently no longer available for download on Linux... Does anyone have a solution to this problem, or maybe a suggestion on what else to do (maybe use a different IDE)?

Something that worked for me in the end was to add

"omnisharp.path": "latest",
"omnisharp.useGlobalMono": "always"

in the settings.json file of Visual Studio Code. It still started complaining after that and it turned out that I needed to install Mono still. I did that by running

sudo apt install mono-complete

in the terminal after which I restarted omnisharp and everything worked like a charm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM