# Visual Studio draws red underlines (“squiggles”) on anything in the UnityEngine namespace

I work with Unity and Visual Studio 2019 and I have 4 scripts in my project.

I was getting almost every single keyword underlined with the red curvy lines (which shows that it is an error) in all scripts but the game works fine when I start it.

I tried unloading and reloading the solution and also rebuilding and building the solution by following the answers of this question. That solves my problem to some extent. Earlier I had 146 errors and now I have only 42 errors and I noticed that the keywords which are underlined red now (at the time of 42 errors) are a part of the UnityEngine namespace.

I tried restarting Visual Studio and also my computer but that doesn't help.

Even though I am getting those red curvy lines, my game runs well doing all the tasks.

If you didn't understand what am I trying to explain, visit this question. The problem stated in this question is kind of the same as my problem, only the difference is that the answers do not seem to work with the UnityEngine namespace.

Earlier, when I was working on the same project I didn't get those errors without any reason. I am now getting these errors. And I have already installed everything which I needed.

You probably didn't install the additional Unity tools for Visual Studio. Here's what you need to do to setup Visual Studio to work with Unity: https://docs.microsoft.com/en-us/visualstudio/gamedev/unity/get-started/getting-started-with-visual-studio-tools-for-unity?pivots=windows

• An edit has been made to the question. You may check it. – Naitik Srivastava May 18 at 16:41

I don't know how and why but I magically/weirdly solved the errors.

This is what I did -