How to enable IntelliSence for Visual Studio Code in Unity

If you have installed Visual studio community along with Unity editor using Unity Hub then you can see that your Visual studio editor has IntelliSence enabled by default. That is, you will be able to see all Unity functions as you type. But if you have installed Visual studio code then you will not see the autocomplete in the editor.

VScode is both language and framework independent. You will need to install the required dependencies to solve this problem.

Unity autocomplete in VScode

Step by step procedure to enable IntelliSence in VScode

  1. Close both Unity and VScode.
  2. Download and install .NET framework 4.7.1 Developer Pack.
  3. Open Unity.
  4. Go to Edit>Preferences>External tools.
  5. Select Visual studio code as your external script editor.
  6. In the external script editor Args box enter “$(ProjectPath)” -g “$(File)”:$(Line):$(Column)
  7. Click on regenerate project files.
  8. Open Visual studio code.
  9. Install C# for Visual Studio Code (powered by OmniSharp) extension.
  10. Close VScode.
  11. Open VScode from Unity. Now IntelliSence should work.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.