I had Visual studio already installed with .NET for C# Console and Form applications.
After that I installed unity, and added visual studio as the external code editor in Preferences → External Tools.
I opened up a script and realized it doesn’t compile. I closed visual studio and unity.
Opened Visual Studio Installer, Clicked on modify, added game development with Unity.
Went back to Unity, opened external tools, refreshed the visual studio, regenerated project files.
Opened the script by double clicking on Unity, it opened up Visual Studio, I made an error on purpose.
if (timerInterval > 0 &&) // AND needs another statement or check
{
//Code
}
Did you actually execute the „Build Solution“ or similar menu item in VS in order to start compilation?
VS doesn‘t automatically start compilation when you save a file.
There’s Attach instead of Compile, and it should be automatically telling me my errors.
That’s what it did on another computer when I used to code there.
You mean “Right click → Open C# Project” in the asset browser?
If so, it does the same thing. And my errors aren’t visible until I save the code and go back to unity.
Visual studio still doesn’t give out errors.
When I save and go back to unity though, it tells me the errors.
Momentarily I do not think there’s a difference between using Np++ and Visual studio since they both make code suggestions, but they do not understand errors.