0
\$\begingroup\$

I am having an issue with Visual Studio Code AutoComplete for Unity.

Some of the autocomplete is working, such as: void Start(), void Update(), but most of the rest of Unity Autocomplete is not working such as: GameObject, Rigidbody, Input.GetKey, etc..)

I know VScode and Unity are not connected like how Unity and Visual Studio are, but it seems that a lot of people make it work somehow, so I thought it is possible to make it work without much trouble.

  • I have the extensions needed to make it work (C#, Unity Tools, Unity Snippets Code etc...)

  • I have set vscode as my script editor (Unity -> Edit -> Preferences -> External Tools)

  • I installed .NET Core SDK and .NET Framework 4.6 Targeting Pack

  • I tried uninstalling Unity and vscode but that didn't work either...

How can I solve this?

\$\endgroup\$
2
  • \$\begingroup\$ I just give up... for anyone out there is having the same problem as I did, just try Visual Studio instead! I know it's slower than VS Code but you'll get used to it, trying to make VS Code autocomplete work is just pain in the ass. I wasted like 1 or 2 weeks trying to make it work but nothing... Admin, should this be an answer ? \$\endgroup\$ Oct 23, 2020 at 14:05
  • \$\begingroup\$ you can follow the instructions here: ehforex.com/2022/01/visual-studio-code-auto-complete-with.html \$\endgroup\$
    – ngochoang
    Jan 5 at 5:09

5 Answers 5

0
\$\begingroup\$

I used to have the same problem, please check which version of omnisharph you have installed, the newest version have a problem with the intellisense, try to install an older version of the omnisharph and it will work ! Also try to check if you have the required plugins for Unity.

\$\endgroup\$
0
\$\begingroup\$
  • See if visual studio code is installed in Unity package manager.
  • In Visual Studio Code, install the following extensions : Debugger for Unity, Unity tools, Unity Code Snippets
\$\endgroup\$
1
  • 1
    \$\begingroup\$ Note that the question explicitly states "I have the extensions needed to make it work (C#, Unity Tools, Unity Snippets Code etc...)" \$\endgroup\$
    – DMGregory
    Jul 9, 2020 at 10:42
0
\$\begingroup\$

Try right clicking in the folder view, and click open c# project, that fixes it for me

\$\endgroup\$
1
  • \$\begingroup\$ Didn't work for me tho D: \$\endgroup\$ Oct 23, 2020 at 14:00
0
\$\begingroup\$

In my case, I didn't installed any .Net, I just installed an older version (1.16.21) of c# extension, I hope this helps

\$\endgroup\$
0
\$\begingroup\$

I used the following method and it worked:

  1. Change in External Tools: Edit -> Preferences :choose " Visual Studio Code"
  2. Open file : Assembly-CSharp-Editor in your project folder and Download the Framework Version that is the same as the version in this file EX: v4.7.1
  3. Open VScode tool - Settings - >code lens and tick.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .