VS Code IntelliSense does not work with Unity. Why?
I am using Unity with VS Code. When I type I do not get any suggestions which are related to Unity. E.g. I am not getting the gameObject
suggested once I type this.
:
Another example is that I can not go to the MonoBehaviour
definition:
I saw this question. So, I checked that all of the extensions recommended in the answer are installed:
The extensions installation did not help. Could someone help with the issue, please?
I am using the Unity 2019.3.2f1.
If in Unity Editor I go to the Window - Package Manager - search for Visual Studio Code Editor I see it is there:
Actually I can not see the definition even for System. So, I believe there should be something wrong on the VS Code side:
Also, I followed the video. It did not help. Under the video there is the comment:
For anyone still cannot get the autocomplete to work, try installing the ".net framework 4.7.1 developer pack".
In my case, I am using Unity 2019.1.2, and I installed dotnet core 2.2 which comes with ".net framework 4.7.2.". Apparently Unity 2019.1.2 requires framework 4.7.1. You can find which .net framework version is required by checking the Assembly-CSharp.csproj file
I followed the comment suggestion. I checked what version is specified in my case in the TargetFrameworkVersion
. It is 4.7.1
. So, I downloaded the 4.7.1
. While installing the version it told me that it is already installed and whether or not I would like to reinstall it. I reinstalled it and still it did not help.