I’ve just started this course and on the very first code on Unity (“Hello World”), I keep getting this error. I’ve created many projects and also checked that my classname & filename match. Still the error doesn’t go. There’s not even a compilation error as it is just a one liner code (also it is with a semicolon (;)). Also I’ve updated versions of both Unity and Visual Studio. Also in Unity, in External Tools, Visual Studio is selected. Tried all sorts of solutions. Help please
Hi Rhythm,
Welcome to our community!
Have you already tried to restart Unity and VS? If so, please try the following suggestions:
- Restart Unity and VS.
- Is Visual Studio selected as your External Script Editor in Unity (Edit > Preferences > External Tools)?
- Are the Unity development tools installed in VS (Tools > Extensions and Updates)? If they are not installed, go to Tools > Get Tools and Features.
- Please check if your scripts are included in the project in Visual Studio. Open the Solution Explorer with Ctrl + Alt + L. A dotted icon indicates that the object is not included. If that’s the case, do the following:
- Reboot your PC.
- Close both Unity and VS. Go to your project folder and delete all sln and csproj files. Then start Unity again, double click on the script file inside your Assets folder in Unity.
- Try to update VS.
- Try to update Unity.
Did any of these fix the issue for you?
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.