C
C#13mo ago
kfir (kfir)

❔ Visual Studio Code doesn't highlight a syntax error in C# (with Unity)

I have the Unity Debugger and C# plugins, and still nothing comes up. I know it is an error becasue when I load the file in unity the compiler notifies me instantly. I tried looking online but I can't figure it out, can anyone help?
12 Replies
Buddy
Buddy13mo ago
Unity support for VSCode is legacy and should not be used
kfir (kfir)
kfir (kfir)13mo ago
damn, what should I use instead?
Buddy
Buddy13mo ago
Either Visual Studio Community 2022 (free) or Rider (paid)
kfir (kfir)
kfir (kfir)13mo ago
awe.. I see. vscode is so nice though, a shame. thanks
Buddy
Buddy13mo ago
Unity plugin was part of a hackathon years ago, really weird though that Unity played it off as it was supported. Also make sure you change this $unitybug
MODiX
MODiX13mo ago
If intellisense is not working for VSCode / Visual Studio, follow these steps.
Go into Unity Editor -> Preferences -> External Tools -> Set Visual Studio (or Visual Studio Code) as your preferred editor.
Go into Unity Editor -> Preferences -> External Tools -> Set Visual Studio (or Visual Studio Code) as your preferred editor.
Close the editor and re-open it again by double-clicking a script file.
kfir (kfir)
kfir (kfir)13mo ago
really? 1.6 mil downloads from a hackathon plugin I downloaded another plugin that should work good but no luck gotcha well that's disappointing, wish I could've made it work thanks for the help
Buddy
Buddy13mo ago
There is however a fork of it. https://github.com/Chizaruu/com.tsk.ide.vscode But that also means there's no direct support.
kfir (kfir)
kfir (kfir)13mo ago
what is that?
Buddy
Buddy13mo ago
Community-ran Unity plugin for VSCode.
kfir (kfir)
kfir (kfir)13mo ago
oh, that can't be downloaded from the plugin section in the IDE? ooh I can try that it was updated just 2 days ago seems good maybe it's not the best idea long-term but... update: managed to get it working w/o any need for a plugin - just a reinstall!
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.