'IntelliSense doesn't show Unity hints

So I'm new to Unity and I'm watching a few tutorials to learn the basics. Something that got my attention is that in the videos they have an autocomplete and while I've got it too, it gives too few options. For instance it doesn't show the Debug or any of its properties. It runs fine but it's really annoying.

I don't know if it's related but it also lacks some coloration. Like in the videos Debug is colored orange but mine is not colored differently from the rest.

What I see in VS



Solution 1:[1]

Not sure about your VS version and Unity version, but please update them if possible. For example, you have VS2017 15.8 and Unity 2018.1, then please update them to VS2017 15.9.17 and Unity2018.3.8 or higher.

And it seems to be one similar issue like this report in DC. You can find details from Sebastien Lebreton for trouble-shooting the issue there.

Make sure:

  • Visual Studio is set as your external script editor in Unity (Edit/Preferences/External Tools)

  • Visual Studio plugin is installed in Unity (Help/About must display a message like Microsoft Visual Studio Tools for Unity is enabled at the bottom).

  • Then check that the extension is properly installed in Visual Studio (Help/About).

You can try:

  • backup your project

  • quit both VS and Unity

  • remove all generated sln/csproj

  • remove the hidden .vs folder in VS Solution folder

  • remove the Library folder

  • re-open the project with Unity

  • In Unity, use Assets/Open C# Project to open that in Visual Studio

Solution 2:[2]

In addition to Lance Li-MSFT's answer I happened to observe this: When you create a new script (for example with "Add Component" -> "New Script") and then try to open it directly, this can happen. So after you created your script, give unity a few seconds to compile and then open it. For scripts that are opened to early, I did not manage to fix them. They just won't show IntelliSens hints, otherwise they work perfectly normal.

Solution 3:[3]

Just spent some time solving this (VS 2022 community, Unity 2020.3.30f).

It happens that by defaut in Unity Edit \ Preferences \ External tools "External script editor" is set to "Open file by extension". And script does open in VS 2022, and script compiles in Unity after editing, but it does not create .vs folder with all project related stuff. So intellisence just did not kick in to Unity.

But after I set "External script editor" to Visual Studio, it started to work (hints and coloration).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 LoLance
Solution 2 nrs
Solution 3 unity newbie