I am following a tutorial about Unity and I see that the instructor has intellisense when writes the method\'s name.
However I have only intellisense with classes an
Intellisense is a pure workflow of .Net Environment. So, you need to have .Net 'Developer pack' (not Runtime) installed on your system as it installs all three necessary components below:
reference link: https://dotnet.microsoft.com/download/visual-studio-sdks
It is directly installed to a system admin-accessible path, so no need setting it up. Now, you have to tell VS Code which .Net version to use (whichever you have installed). Your Unity project will have these two files in the root directory:
In these both files search for line (probably 16):
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
Edit version that you had just installed (I had 4.8). Then reopen VS Code. Now everything should work fine.
Old question, but I had the same problem just recently.
There must have been an issue in your Assembly-CSharp.csproj or project-name.sln files. Most likely to be the .csproj file. If you take a look at it, you will see various references to .dll files.
You can tell Unity (my version: v2019.2.20f1) to create these for you by enabling Edit > Preferences > Generate all .csproj files.
1. Delete both files.
2. Enable .csproj file generation.
3. Double click on a script in Unity.
This fixed my issue.
I would really like to clear things up a bit for everyone trying to get intellisense working with Visual Studio Code.
First of all I am writing this for Unity 2019.4.14 as it is the newest version.
These are the things you MUST do for this to work:
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application.
dotnet
in the VSCode terminal.Now, what about Unity Code Snippets and Debugger for Unity extensions? Well these are useful helper extensions but they have nothing to do with Intellisense. The first is for quickly typping common Unity patterns and the second is for showing Unity Debug warnings and errors as you type instead of saving and going back to Unity and reading the console.
Hope this was of any help.
Though the question is 2 years old, the problem pops up occasionally, just like happened to me.
I had the issue myself, so this one is possibly the first that should be checked.
WHY?
First of all, I work with dotnet core, not the standard, so I don't have standard libraries installed on my computer. When I started trying Unity, and VS Code with it, this was the missing part I wasn't aware of.
When I hit the issue, I searched the net a while and see this question. Took me another while to notice this framework sentence in "Enabling code completion" section of VS Code and Unity page. So I tried and now I am happy I tried.
Just don't forget you need to restart at least VS Code to get the intellisense working.
PS: Framework version may, and will most possibly, be changed depending on what year we are in, and which versions we use. So if "4.6" is not working then you probably need another version.
PS2: If it is Mac you are looking for, follow the same link above and find the same section I mentioned above to get a link for .NET SDK.
Although the answer by Alex Myers is helps, its not 100% right. Unity Snippets does give you some snippets, and the illusion of typeahead, it's not actually intellisense.
For true intellisense you need to:
More information can be found here: https://code.visualstudio.com/docs/languages/dotnet
You can test you have dotnet installed by typing dotnet
into the terminal within VSCode.
Note In the image below how I get a full method signature, reference counts, and the yellow hint globe. These are only available when using dotnet + extension (and not available when using the snippets)
Check out the guide for Unity Development with VS Code. They recommend a few extensions:
I believe the Unity Snippets extension is what you are looking for.