Visual Studio Code not working with unity
Asked Answered
F

2

0

I have been using Visual Studio Code with unity for about 3 years now, but recently it has stopped working properly. Normally errors show up in VS code with the red line under them, but that has stopped working, along with intellisense. I have tried regenerating project files, reinstalling VS code and uninstalling and reinstalling the Visual Studio extensions in unity, but nothing has worked. Any help would be much appreciated.

edit: I have intalled vidual studio community 2022 and that works fine, but if anyone has any ideas on how to get vscode working it would be great.

Foul answered 23/1, 2024 at 19:15 Comment(0)
V
0

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.

Vespid answered 23/1, 2024 at 19:14 Comment(1)

Thanks so much this was very helpful!

Foul
I
0

Unity have given up link to VSCode…

So it’s better to move on

Iota answered 28/5, 2024 at 13:14 Comment(1)

Really? since when?

Foul
V
0

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.

Vespid answered 23/1, 2024 at 19:14 Comment(1)

Thanks so much this was very helpful!

Foul

© 2022 - 2025 — McMap. All rights reserved.