
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. (you might need to restart VSCode after regenerating project files in order for this to work)
Open any C# file from Unity and you should be good to go. I checked Embedded Packages, Local Packages, and Packages from unknown sources. 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.
This will enable Unity to generate proper project files for VSCode.
In Unity go to Package Manager and install Visual Studio Code Editor. In VSCode search for the 'C# for Visual Studio Code' extension and install it. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. NETFramework,Version=v4.7.1 were not found. NET Framework Dev Pack because otherwise VSCode is going to be throwing this error: NET SDK installed by typing dotnet in the VSCode terminal. Make sure you install the SDK, not the runtime. I don't think it matters which version, latest is the best I guess. These are the things you MUST do for this to work: also autocomplete like they should.I would really like to clear things up a bit for everyone trying to get Intellisense working with Visual Studio Code.įirst of all I am writing this for Unity 2019.4.14 (edit: also for 2020.3). Many Unity things, like Vector3, GameObject, Destroy, transform, etc. autocomplete, so the C# extension seems fine. Generic C# things like return, void, int, etc. NET, Mono, Debugger for Unity, the C# extension, and got Unity Tools for good measure. I looked at this Microsoft help page about VS Code and Unity, and I have everything it I seems I would possibly need to combine the two I have. However, many other Unity things do automatically show up as options. I have been following along with a tutorial and the autocompletion functionality of Code seemed fine until the function OnTriggerEnter, which was shown as autocompleting for the guy in the video (who was using the other Visual Studio), didn't fill in. Things seemed to work fine between Unity and Visual Studio Code, but now I realize that something is wrong with Code. I am using Unity 2018 with Visual Studio Code version 1.43.2 on a Mac.