Autocomplete in Visual Studio Code

Hi, i can see in the C# Survival Guide tutorial series that for example when you want to type “Time.timeScale” or “Input.GetKeyDown”, it autocompletes or gives you all options you can write. Also for example if you type “KeyCode.” then a menu appears with all possible Key Codes so you can choose from that menu instead of looking for it on the documentation. The problem is that it doesnt happen in my Visual Studio Code neither in my Visual Studio 2019, i would like to know how can i configure my Visual Studio Code or VS 2019 so it can autocomplete things like “Time” and “Input”.

Thank you!

@PB457
Did you try closing folder in VS Code? (File->Close Folder)
And please check if you are using ".NET 4.x". You can set it up from Edit->Project Settings->Player->"Your Platform"->Other Settings and in Configuration there is API Compatibility Level.

Try setting .NET 4.x there and re-open the script.

@monan212 @PB457 I had the same issue.

What worked for me was to ditch VSCode whatsoever as it doesn’t work with Unity very well, and to use Visual Studio Community 2019. Make sure that when you install it, you tick the option to have unity developer tools enabled. Afterwards, when that has finished installing, please go to:
Edit->Preferences>External Tools and at the top of that menu, there’s a dropdown menu called “External Script Editor”. Please select “Visual Studio 2019” or something along those lines. That will fix autocomplete.

Thanks for answering but I solved it after one hour but still thanks .