How to get intellisense in Visual Studio Code for Unity functions names?

Old question, but I had the same problem just recently.

There must have been an issue in your Assembly-CSharp.csproj or project-name.sln files. Most likely to be the .csproj file. If you take a look at it, you will see various references to .dll files.

You can tell Unity (my version: v2019.2.20f1) to create these for you by enabling Edit > Preferences > Generate all .csproj files.

 1. Delete both files.
 2. Enable .csproj file generation.
 3. Double click on a script in Unity.

This fixed my issue.


I would really like to clear things up a bit for everyone trying to get intellisense working with Visual Studio Code.

First of all I am writing this for Unity 2019.4.14 as it is the newest version.

These are the things you MUST do for this to work:

  1. You need Visual Studio Code (duh)
  2. The .NET Framework Dev Pac (not just the .NET core, not even the .NET core SDK, but the Framework Dev Pack because otherwise VSCode is going to be throwing this error:

The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application.

  1. Check if you have .NET installed by typing dotnet in the VSCode terminal.
  2. In VSCode search for the 'C# for Visual Studio Code' extension and install it
  3. In Unity go to Package Manager and install Visual Studio Code Editor. This will enable Unity to generate proper project files for VSCode.
  4. In Unity go to Edit -> Preferences -> External Tools and choose VSCode from the dropdown (could be listed as code.cmd) and after you choose it tick all the checkboxes you want in the Generate .csproj files for section. I checked Embedded Packages, Local Packages, and Packages from unknown sources. Click 'Regenerate project files'
  5. Open any C# file from Unity and you should be good to go.

Now, what about Unity Code Snippets and Debugger for Unity extensions? Well these are useful helper extensions but they have nothing to do with Intellisense. The first is for quickly typping common Unity patterns and the second is for showing Unity Debug warnings and errors as you type instead of saving and going back to Unity and reading the console.

Hope this was of any help.