Snippets stopped working

Hi everyone!
Today, I created a new C# file (WeaponSwitcher.cs), but the snippets didn’t work there:


Moreover, all (even those that worked earlier) C# scripts got an error
No MonoBehavior scripts in the file, or their names do not match the file name

I fixed this problem by deleting and creating the new script. But the snippets still don’t work.

Yeasterday VSCode worked perfectly.
Nothing in Unity and VSCode has been updated since yesterday.
The problems appear in other projects as well.

I tried deleting Assembly-CSharp and .sln files from the project folder, it only returns the “No MonoBehavior” error.

UPD: Deleting the WeaponSwitcher.cs partially fixes the issues (I still can’t extract methods by Ctrl + .), but once I create any new script they return.

Can you help me please find out what’s going wrong and what needs to be fixed?

Oh, there is a guide for these cases in the Unity course now.
Lection 4
It appeared that I had to install new .NET

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

Privacy & Terms