Intelisence - No Quick Fixes

I was working through the course and got up to the firing of the missles course and suddenly the quick fixes for intelisense stopped working. I went through some debugging and googling on this issue and was unable to fix it. I scrapped everything. Uninstalled all Unity and VSCode and started over. It still didn’t work. I wanted up upgrade to a 2TB hard drive so I slipped a new M.2 drive in my machine and I now multiboot until I clear off the old drive.

Now with a fresh install of windows 10, I installed Unity Hub, the exact version of Unity used in the course. Current VS Code. I follow the instruction up to this lesson. I made sure to match the Extension versions exactly (C# was v1.26.0; Unity Code Snipits was v1.3.0). I am now getting my red squiggles under the unknown text, but I get no Quick fixes. The plus is I will have to learn them; the negative is you go through so quickly in this course I can’t catch them all.

Any suggestions on a fix would be appriceated. Here is a screenshot:

In terms of fixing Intellisense within VS Code… VS Code is a bit of a moving target when it comes to supporting it. That’s why I don’t use it at all. We use it within our lectures because it is available for Windows, Mac, and Linux, but it comes at the expense of using an open source editor that breaks easily in any of the three platforms.

In terms of the specific error, were Intellisense to be working properly, my guess is that it would suggest that you add

using Unity.NetCode;

to your usings clauses at the top of the script.

The chances are that the issue is being caused by dotnet version 4.7.1 developers pack being installed or a newer version being installed after.
I came up with this problem when my friends wanted to play skyrim together and modding that with a mod installer installed dotnet 6 which broke my intellisense.
If this is the case you need to rerun the installers for the dotnet versions you have installed and uninstall them and then only install 4.7.1

If this is not the issue you can check if omnisharp is running in the bottom left corner and it should have the projectname.sln there as well.

If its not running then you can try pressing control and P and then selecting the omnisharp for select project and then find your sln file and see if that works (If its not there then usually its still the dotnet issue)

Also check that you have the correct extensions installed in vscode to see if that could be the issue.

Its worth running through the video in the course which has Gary in it (I forget offhand which one it is but its around the install and set up one) and see if anything is amiss there.

As to fixing the code Brian’s suggestion to add using Unity.Netcode; will solve the error as its not finding NetworkManager as its part of that package and you are not accessing it here.

Hope this helps

Yes, that is how to get things working. What is being show in the course is the “Quick Fix” that automagically adds the code for you so you don’t have to know if it is Unity.NetCode or Unity.Networking that you need to add.

I had 3 updates to .Net 4.7, 1 .net 6.0, and 2 updates to .net 7.0. I have removed all but Microsoft .NET SDK 7.0.304 that came from Visual Studio (installed with the Unity version). I will see how it goes.

Definitely seeing a pattern with .NET 6 and VS Code’s Intellisense.

1 Like

OK, everything is running properly now.

My solution in case anyone else needs it:

  1. .Net 7 is installed from MS Visual Studio (removed and Intellisense breaks)
  2. .Net 4.7.1 is also installed. From a reddit article it suggested installing this version as well.

After both .Nets are installed intellisense is working properly again. I don’t know what I updated or removed to cause the inital problem, but I am happy now. Having to go through all the lessons I previously went through as I trashed the entire project. As I repeatedly say, “repition is the key to learning.”

2 Likes

Glad to hear its all up and running again. It may have been a requirement for a game or like i said i had to install it for using Vortex to download the mods for ease (Next time i will be doing it manually!)

It does seem to be net6 causing the issues and the C# side of things that seems to break as my unity autocomplete seems to work.
At least now we know that net6 needs to be removed and 4.7.1 possibly removed and reinstalled to solve the issues :slight_smile:

Privacy & Terms