1

The question is as the title says.

My settings:

Unity version: 2020.3.24f1 (it's the LTS)

VS Code version: 1.63.0

I got some extensions for VS Code: C#, VS IntelliCode (don't think this matters)

Things that I've done:

  1. https://forum.unity.com/threads/cant-get-vscode-to-work-properly-with-unity.538224/
  2. https://forum.unity.com/threads/intellisense-not-working-for-visual-studio-code.812040/
  3. Unity VSCode autocomplete Intellisense not working
  4. Installation issue with Visual Studio using Unity
  5. How to get Visual Studio to recommend unity codes
  6. Unity Scripts edited in Visual studio don't provide autocomplete
  7. VSCode with unity c# autocomplete problem
  8. Unity VSCode Intellisense not working in 2020 version

TL;DR -

I've set Visual Studio Code as my external script editor, tried downloading mono editor + gtk thing, snippet tool is NOT what I want, restarted my computer, and few more that I can't even remember.

Please don't recommend other editors than VS Code because I see so many thread pointing to VS Community 2019 and I just can't see how VS Community solution is relevant to VS Code.

2
  • 1
    Vscode has numerous posts on not working and seems to be more trouble than its worth. I guess people say vs community because its also free and isnt such a pain
    – BugFinder
    Commented Dec 12, 2021 at 0:15
  • 1
    VSCode is a pain in the ass to use with unity. I tried it for a while and it regularly broke even with no changes to my configuration whatsoever. You should really reconsider using VS Community or some other IDE like Rider. I personally use Rider and never looked back.
    – Nicolas
    Commented Dec 13, 2021 at 18:01

2 Answers 2

0

I had the same issue and I solved it randomly so I will tell you the things I tried:

  1. uncheck all options in unity>edit>preferences>external editor>generate .csharp. I checked all of them because a youtuber told me but then I saw that input system and cinemachine namespaces won't work so I unchecked them, now it works, it also helped on autocomplete.

  2. download unitydev extension package from VS Code extensions, this package has all the needed documents and snippets and autocomplete assets.

  3. try to regenerate files and reset argument, change editor to something else and see if it won't work there too!

  4. most important: downgrade vscodes pakcage in unity package manager. I think I used 1.2.0 and it worked.

1
  • 3
    Hey, can you tell us what "unitydev" extension you are talking about? Who is the author so I can follow up with this post. Thanks! Commented Oct 10, 2022 at 13:43
0

I have tried many things and this guide solved it for me. Notice we must install dot net 4.7 instead of a newer version, otherwise if you go over to the 'output' section of vs code you'd see Omnisharp complaining about not having that version of dot net.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.