VS code doesn't detect UnityEngine.UI library - Unity

Viewed 542

The issue is VS code doesn't see UnityEngine.UI library.

I had this issue before and I solved like it this: I changed the code editor in preferences to Visual Studio, regenerated files and launched c# project. On the start, vs created needed .csproj files and then I closed vs and changed it back to vs code and it workeed.

However, now I am working on another project and I encountered same issue, I tried the method I described above but it didn't work.

Any ideas?enter image description here

2 Answers

So, after days of tinkering and trying different solutions I found on the internet I finally found out how to solve it (all by myself).

Switch to VS and make sure it detects the UnityEngine.UI library. Then don't close VS, switch to VS Code, don't hit "regenerate files", launch c# project, enjoy!

Related