The VSCode editor package (com.unity.ide.vscode
) is no longer being developed by Unity and has stopped working in newer versions of Unity.
But the Visual Studio editor package (com.unity.ide.visualstudio
) has been updated to support VSCode instead.
Uninstall the VSCode and install the Visual Studio editor package. Then select VSCode under Preferences » External Tools » External Script Editor
. Make sure project files are regenerated using Assets » Open C# Project
and that you have the latest version of the C# Dev Kit extension installed in VSCode (just the C# extension should work as well and avoid the need to have a Visual Studio license but with less features and it didn’t work properly for me when I initially tried it).
Background: The Rider and Visual Studio Unity editor packages aren’t developed by Unity but by JetBrains / Microsoft. The VSCode package was the exception, as it began as an internal experiment by Unity. But Unity decided they want Microsoft to develop the VSCode integration as well and either really bodged the transition or strong-armed Microsoft into taking over, by first threatening and then actually deprecating the VSCode editor package until Microsoft gave in and took over. Either way, messaging from Unity was atrocious throughout the whole saga, even now the documentation hasn’t been updated and you can’t tell what’s going on without reading through some forum posts.
Thanks so much this was very helpful!
– Foul