Syntax highlighting/ Code suggestion not working

I have noticed that for some bits of code there is no highlighting at all, And Sometimes the code suggestions do not show (until i have typed it the first time). This can get annoying when typing more complicated stuff as i tend to make some typos. I am happy to provide screenshots where necessary.

Unfortunately, Visual Studio Code/OmniSharp doesn’t work as well with Unity as it used to. Personally, I no longer recommend it in favor of Visual Studio Community (free) or JetBrains Rider (paid).

So is it the fact that Garry is using a older version of VSC/plugin that his syntax highlighting is working better?

Essentially, yes. There are some tricks and tips, and some students have more success than others. You can check here for how to get OmniSharp to start playing better with Unity (though it’s a 50/50 tossup if it works or not) VSCode omnisharp not loading - Unity Answers

1 Like

Ill give it a shot and let you know my outcome, thanks for the link

I think the reason it may not work is that omnisharp appears not to work

Yes, OmniSharp decided they no longer wanted to support “older” implementations of C#, and apps like Unity are usually 1 to 3 versions behind the current C#/.NET standards. One of the comments in the thread I posted details how to tell OmniSharp to work with the older code base, but as I said, it seems like a potluck on whether or not it works.

Three years of helping students with Unity, and every time I figure out the changes Visual Studio Code or OmniSharp has made to make it not work with Unity, they change it again. We’re having an internal debate about continuing to recommend it officially (we use it in the videos because Visual Studio Code works on PC, Mac, and Linux. With Linux users, not many options, with Mac, Visual Studio Community now works on Macs).

Ill have to download VS Community and give it a go. I am used to using vsc for python coding (learnt with vsc). Unity integration is really the only issue i have faced

I found downloading .net sdk 7 seemed to fix a few issues (suggested by a pop up in vsc). The highlighting (i changed back to the default theme). I also found a handy guide that shows how to fix intellisense

Here are the raw links:
.Net 7 download: Download .NET 7.0 SDK (v7.0.101) - Windows x64 Installer
Intelli sense guide: Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms