How to enable IntelliSense on Visual Studio when working with Unity
‘IntelliSense’ is a code completion tool that is built into Microsoft Visual Studio. This is a question you might get during the early days of your Unity development. I see many ask this question during workshops. So thought of putting the steps into an article. If you wonder, when you are editing your scripts on Visual Studio, why some of the packages are not properly linked hence you cannot look into their implementation Or the autocompletion is not working as you see in many tutorials? Well, this is a very short article on how to solve this problem. For your additional information, ‘IntelliSense’ sometimes referred to as code completion or code assists as well.
Before diving into the steps, here are the versions of the tools that I am using in this article.
- Unity - Version 2019.3.15f1
- Microsoft Visual Studio Community 2019 - Version 16.7.1
The first step is if you have already opened your Visual Studio, close it. Then go to Unity and then go to Edit → Preferences… You will see the following window after you select the External Tools option on the left-hand side of the window. Refer to Figure 1
In this window, click on the drop-down in front of ‘External Script Editors’. Then select your favourite editor. Since I am using Visual Studio 2019, I selected that. Refer to Figure 2.
Also, I am gonna use the checkboxes below in .csproj files. Finally, the window settings looks like below in Figure 3
Now close this window and go to back to Unity project window and double click on the script that you were working on. Well, the problem should be solved.
If you like the article, you can buy me a virtual coffee 😊;