Why doesn't the code autocomplete or doesn't give you suggestions?

I was watching different tutorials where they use the same program to program as me (Microsoft Visual Studio) and they autocomplete part of the code and mine don’t 8641194--1162248--upload_2022-12-6_21-3-27.png
(This is a screenshot of the tutorial)

Update your Visual Studio IDE.

Close Visual Studio. Inside Unity, go to Assets → Open C# Project. If this doesn’t work, close Unity, open your project directory in Windows Explorer and delete any .csproj and .sln files there, along with directories like Library and obj. Reopen the project (it’ll take a bit longer than normal as those directories are regenerated) and do the Open C# Project again. Your IDE should have access to the Unity API for Intellisense now.

1 Like

Could it be because I downloaded Visual Studio from the Microsoft Store?

No, that’d have nothing to do with it. Did you try the things I suggested?

Yes, I already tried it and only the language was fixed. Visual Studio also gives me this error, do you think it could be that? 8646939--1163160--upload_2022-12-8_17-3-59.png

Run the visual studio installer, click on “modify” and in the workload selection check “game development for Unity”. It should install all that is needed to work with Unity.

2 Likes
1 Like

I don’t have the Visual Studio Installer because i download it from Microsoft Store.

Didn’t work.;(

I’m not familiar with the windows store version, but it should have installed a separate program called “Visual Studio Installer” that lets you configure the installed components. You should have seen that during the first install. Just type it’s name in the start menu and it should come up.

Also, make sure it’s Visual Studio Community (the purple one) not Visual Studio Code (the blue one). VS Code support for Unity has been abandoned.

– EDIT –
I just installed it through the store and the setup is identical to the standalone version: it does first install Visual Studio Installer, which manages the actual VS installation.

Hmm, if VS support for Unity’s been abandoned, how do I write code if/when I ever successfully make anything?

The VS Code extension no longer receives updates but it still works.

Do you install Visual Studio Code or the Visual Studio Community? Also, should i delete it and install it again? And i can’t find the Visual Studio Installer

Community.

I solved my problem, thank you so much to all;D

1 Like

In Intellisense Not Working with Visual Studio (Fix)
SpinJack said:
"That didn’t work for me… :frowning:

I already had Visual Studio Code selected as script editor.
I didn’t have any checkboxes selected under “Generate .csproj files for:”
I added the checkboxes to all of them, but it had no impact when I reopened a script through Unity.

Unity recognizes that Visual Studio Code is my External Script Editor, but intellisense in Vis Studio Code still does not recognize or provide autocomplete for Unity namespace items.

Edit: After a bit of searching I found the solution!

In addition to the steps listed above in this thread, there is also a Visual Studio marketplace addon that I had to install! Install the following free addon extensions from Visual Studio Marketplace. I would’ve provided links but the Unity Forum marks it as spam.

Debugger for Unity by Unity Technologies
For me, the Unity Debugger finally fixed it!

Two additional optional Unity tools to consider installing:
Unity Tools by Tobiah Zarlez
Unity Code Snippets by Kleber Silva

I installed all of the above, and I’m happy now! :slight_smile:

In my case, I just installed Unity and Visual Studio Code for the first time a few days ago and I just didn’t know about the extra Unity extensions that I REALLY needed."

THIS SOLVED MY PROBLEM. ^^

You are the best bro!
IT F**king worked. I’ve been searching for weeks, or on and off for a year. This will motivate me to learn game development so much more