I’m having some really strange issues with auto-complete on VSCode on unity.
It works on some older projects but does not work on any projects regardless of what version of unity the new project is on.
I’ve tried everything.Went through the forum and re-installed VSCode, installed Mono (Though I’m on windows), installed everything from Visual Studio Code and Unity, tried opening folder from VSCode and tried right clicking the script then “open c# project” and nothing works.
I don’t understand as it worked 2 months ago when i used it.
I am currently using Visual Studio Community but it’s now saying that My trial is about to expire and I prefer VSCode.
Is anyone from Unity able to support me with this? please.
Recreating sln to include csproj assembly worked for me.
Delete the files if you have them and temporarily set the editor to “Visual Studio”.
The editor shows checkboxes to generate csproj and add to sln.
This is within Unity → Preferences → External Tools.
Edit:
Just found it! And it worked for me!
And for others that’s also new to Unity you find it by opening the Window menu and select Package Manager. Then you should see the package Visual Studio Code Editor package with version 1.1.4 installed. Click on the arrow to the left and select “See all versions”. Select the 1.1.3 version and click on the button “Update to 1.1.3” in the lower right corner of the dialog.
This essentially worked for me, as well. I was on VSCode Editor 1.2.0, reverted to 1.1.3, which did not fix it, but then returned to 1.2.0, which fixed it.
I believe removing and reimporting 1.2.0 also would have resolved it.
Switching the editor in preferences to Visual Studio and then switching it back to Visual Studio Code, also worked for me.
Switch to Visual Studio.
Go to: Edit -> Preferences -> External tools -> External Script Editor -> set it to Visual Studio.
Open a Script in Visual Studio.
Then switch it back to Visual Studio Code.
Go to: Edit -> Preferences -> External tools -> External Script Editor -> set it to Visual Studio Code.
Open a script in Visual Studio Code. See it works.
Maybe it is not even necessary to reopen the scripts and the editor switch will just do the trick.