VSCode Extensions

My VS Code is set up with a variety of extensions that I find useful when working with Unity. It autocompletes most commands I’m trying to use and offers suggestions for overloaded methods.

One thing my VS Code does not do, however, is autocomplete most attributes such as [Tooltip], [RequireComponent], etc. I’ve noticed that the instructor’s VS Code autocompletes these things for him, and I’d like to know which extension he is using to achieve this effect! Any recommendations would be appreciated!

Hi,

The code suggestions while you are typing stem from IntelliSense.

Please follow the instruction on this website and make sure all required extensions are installed: https://code.visualstudio.com/docs/other/unity

If the issue persists, please check the console of VS Code (not Unity!). If the .NET Framework 4.7.1 (Developer Pack) is mentioned there, download and install it from the official Microsoft. Here is the link: https://dotnet.microsoft.com/download/dotnet-framework/net471

Depending on your version of Unity, it might be that you will have to install the “Visual Studio Code Editor” package in Window > Package Manager in Unity.

  1. Press Ctrl + Shift + P.
  2. Type “OmniSharp: Select Project” and press Return.
  3. Select the solution workspace entry.

Maybe you’ll have to reboot your computer. Then launch Unity again and open one of your scripts.

Did this help?


See also:

Hey, Nina! Thank you for your response! I installed the .NET Framework 4.7.1 (Developer Pack), ensured that the Visual Studio Code Editor package was installed in Unity, and I even restarted my computer.

When I try your suggestion about searching “OmniSharp: Select Project” in VS Code, I get the following error:

Command ‘OmniSharp: Select Project’ resulted in an error (Extensions ‘ms-dotnettools.csharp’ CANNOT use API proposal: quickPickSeparators.
Its package.json#enabledApiProposals-property declares: [ ] but NOT quickPickSeparators. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-dotnettools.csharp)

I’m unsure of what OmniSharp is or why it’s throwing this error.

How are you getting on with this, @TheOtherRick?

Hey, Nina!

I was able to run the “OmniSharp: Select Project” command, and I’ve restarted my computer since choosing my workspace. I still don’t have code completion, however.

Hi again, @TheOtherRick. I’m sorry for the late reply for some reason I missed your reply. :frowning:

If you still experience issues with VS Code, feel free to install and use Visual Studio (Community Edition). For some students, VS Code simply does not work well. Maybe due to a problem with Unity, some update or whatever.

  1. Download VS and follow this instruction.
  2. Select VS as your External Script Editor in Unity (Edit > Preferences > External Tools).
  3. Install the “Visual Studio Editor” package in the Package Manager.

That should work.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms