1

When I create a C# script in Unity, no matter what I type there, it won't show any errors. (and if you know please show me what means that yellow line next to the numbers of lines and how to turn it off).

Example:

enter image description here

It actually looks like VS doesn't recognize it as an error. The only time I get errors is when I check my unity project: this is error from unity I want to clarify that this error is not important. It's just to show how it works (won't show error in VS but in unity i does). Here is error from this screenshot:

Assets\NewBehaviourScript.cs(19,24): error CS1002: ; expected -----

But it's obvious because there is a lot of nonsence since I was testing the error highlighting). This is from VS

riQQ
  • 9,878
  • 7
  • 49
  • 66
Fero Mrkva
  • 11
  • 1
  • 3
  • 1
    Does this answer your question? [Visual Studio Editor does not underline errors anymore](https://stackoverflow.com/questions/267843/visual-studio-editor-does-not-underline-errors-anymore) – Jawad Jan 20 '21 at 14:32
  • 2
    Yellow line shows you the changes you have made but not saved yet. – Jawad Jan 20 '21 at 14:33
  • Honestly none of those worked for me. Most of the answers are based on tools text editor and check somethink but i already did all of that and nothink helps. – Fero Mrkva Jan 20 '21 at 15:11

3 Answers3

0

Updated Link:

If you're still having trouble try updating the visual studio/code syntax extension HERE.

Turbrex
  • 7
  • 4
  • Thanks for the answer thou i already tried this and it didnt work. – Fero Mrkva Jan 20 '21 at 15:04
  • Yes try out the second link and update your visual studio/code syntax link. You could always reset your settings to default. – Turbrex Jan 20 '21 at 15:20
  • I tried that still no errors maybe i am just dump and in reality its somethink really simple .... – Fero Mrkva Jan 20 '21 at 15:48
  • This is not an answer. It is a link to an answer. Which is great, until Microsoft decides to change all of their URLs again and someone else has to keep that URL up to date. If the license allows it, please copy the relevant information from that link here to Stack Overflow and provide attribution. – Heretic Monkey Jan 20 '21 at 15:50
  • The link leads to a extension gallery for *Visual Studio Code* and not for *Visual Studio* (extensions are not compatible for both). – riQQ Mar 24 '21 at 18:25
0

You can try to set your vs settings:

Tools->Options->Text Editor->Show error squiggles(Make sure this is checked)

Like the following:

enter image description here

Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
0

From your screenshot you can see from the selected item Miscellaneous Files of the dropdown below the file name, that the opened file is not part of the opened solution or the opened projects.

There is no error highlighting for these files.

enter image description here

riQQ
  • 9,878
  • 7
  • 49
  • 66