I've downloaded VSCode as an IDE for Unity including the extensions unity Debugger and Unity code snippets. The editor shows me suggentions like awake() or start() methods but no variables like Rigidbody, transform or input. How can i solve this problem?
-
1Does this answer your question? [Visual Studio Code error when using Unity](https://stackoverflow.com/questions/61924474/visual-studio-code-error-when-using-unity) – Jun 04 '20 at 06:23
4 Answers
I´ve had the same problem. Only switching to Visual Studio (and downloading the Unity extension) solved it for me.
My Colleagues first recommended Code to me too, but in the end I didn´t see the benefit in it.

- 21
- 5
In Unity Edit -> Preferences -> External Tools -> Select your external script editor
Still having troubles?
I answered a similar question here:
Visual Studio Code error when using unity
Also here:

- 2,472
- 1
- 10
- 21
You can install only one extension for Unity in VSCode.
unity3d-pack (1.0.0)
This package contains 10 packages in it and all sub-packages are useful for Unity programming.
C#
C# FixFormat
C# Snippets
C# XML Documentation Comments
Debugger for Unity
Shader languages support
Unity Code Snippets
Unity Tools
ShaderlabVSCode(Free)
Code Outline

- 642
- 5
- 12
I tried a few different quick-fix solutions, and none of them worked for me. I finally realized that there was a better way to debug this myself:
- Open the Output panel in VSCode ("View -> Output" from the top menu)
- Select "OmniSharp Log" from the drop-down in the top right of the Output panel
The problems were MUCH easier to debug once I could see the problems OmniSharp was having just trying to start up. Here were the problems on my Mac:
- Somehow, the option "Omnisharp: Use Modern Net" was set to true. This is not supported by the Unity integration, so I had to unset it.
- Even though
dotnet
was on my path, VSCode couldn't find it. I ranwhich dotnet
in a terminal to find the path to thedotnet
executable, and set the "Omnisharp: Dotnet Path" setting to that path. - Even though
mono
was on my path, VSCode couldn't find it. I ranwhich mono
in a terminal to find the path to themono
executable, and set the "Omnisharp: Mono Path" setting to that path.

- 2,868
- 30
- 29