Reputation: 21
Note this is on my desktop;
I started a little side project in unity several weeks ago, and intellisense was working just fine. It had been working since I switched my unity code editor to VSCode long before I started this project. I went to work on it a little today and it was just gone. The only suggestions it gave me were words it had already seen, i.e. C# methods I'd used like AddLast from a LinkedList or a few method names from my own classes I'd referenced.
Every suggestion was either marked with the little "abc" tag instead of the icons indicating whether they were properties or methods, or the suggestion was a method related to unity with a missing icon.
This is especially weird, because I have a "duplicate" project on my laptop that I carry with me on campus so I can jot ideas down the second I get them. Everything is the same between both devices, the same project settings, the same preferences, the same VSC environments, the same extensions, settings, preferences, and packages.
I get intellisense on my laptop.
I've been reading threads for hours, and nothing has worked from any of them! Fresh install of C# dev kit, eliminating sln/csproj files and regenerating them from preferences, changing .net compatibility level, pointing omnisharp "in the right direction," and hours of watching unity, vscode, and my desktop shut down and reboot just to name a few.
Thanks in advance for any helpful pointers, proof I belong in a mental ward, or both!
Upvotes: 0
Views: 1508
Reputation: 590
For people looking for a more simpler solution. You can just install the .NET 4.7.1 developer pack which takes care of the unsupported code. Make sure to close both Unity and VScode before the installation. See this VScode and Unity integration guide for more details.
Upvotes: 0
Reputation: 21
I found the issue
Modern C# extension updates with vs code don't support unity. See here:
Following the issue's heed, I turned off modern net with omnisharp while using extension version 1.25. Then, I updated my vs code package to the latest version (1.2.5 as of writing) and regenerated all project files from preferences (having vs code set as the designated editor).
All credit to sleepysheepy for pointing me in this direction
Upvotes: 2
Reputation: 216
Does it help if you go to the C# extension and roll back to version v1.24.4, and then reload VSCode?
Pardon me if you already said you tried that! That's what did the trick when IntelliSense stopped working for me recently.
Upvotes: 0