3

I'm using VS Code and Unity, and I noticed that errors are showing on Unity console but not the VS Code, I looked up and did everything that this page says and nothing worked: https://code.visualstudio.com/docs/other/unity

Is there a fix to this?

5
  • Have you properly setup VS code with unity? Follow this guide code.visualstudio.com/docs/other/unity to make sure. Commented Mar 7, 2022 at 20:50
  • @MrMoonMan As I said above I did everything there already and the errors are still not showing for C# Commented Mar 7, 2022 at 21:11
  • Just a wildshot here, but are you maybe trying to install a debugger? marketplace.visualstudio.com/items?itemName=Unity.unity-debug Commented Mar 7, 2022 at 22:44
  • @dekuShrub I have it installed however I cannot select it as a Debugger. In the extension page I read that if it doesn't appear I need to delete the "launch.json" file but I did it and it still doesn't show up. Do you know if there's a way I can manually add it as a configuration to the file? That would fix it for sure. Commented Mar 7, 2022 at 23:27
  • @JoãoSilva it is explained in the link I added in my previous comment. I'm guessing that you can just copy that configuration if you adjust the version number to match your installed debugger. Commented Mar 7, 2022 at 23:39

2 Answers 2

3

I had this problem too. One day Code's errors were connected, the next day, they had disappeared. Most frustrating. This worked for me:-

  1. Install the latest .net SDK from here DotNet SDK download

2) Regenerate project files from Edit->Preferences->External Tools

Note: just regenerating the project files didn't work for me. Needed DotNet SDK update.

Sign up to request clarification or add additional context in comments.

Comments

2

The official doc is wrong https://code.visualstudio.com/docs/other/unity

step 5 : In the VS Code Settings editor (Ctrl+,), uncheck the C# extension's Omnisharp: Use Modern Net setting ("omnisharp.useModernNet": false)

You need to do the exact opposite and check it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.