8

So I have had visual studio 2019 and I used it with unity. I needed to delite it and reinstall it becouse of somthing and when I reinstalld it I installed new 2022 version. Ever since auto complete isn't working.

I have downloaded the "Game development with Unity" modifyer and selected Visual Studio Community 2022 in unity preferences but it still isn't working.

Does anyone have an idea what is wrong maby?

6 Answers 6

12

In the Unity Editor, select the Edit > Preferences menu. On the left, select the External Tools tab.

Select Browse... from the dropdown list. Navigate to the C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE directory and select devenv.exe. Then select Open.

enter image description here

Close the Preferences dialog to complete the configuration process.

And make sure that you have Microsoft Visual Studio installed in package manager: enter image description here

check this link: https://learn.microsoft.com/en-us/visualstudio/gamedev/unity/get-started/getting-started-with-visual-studio-tools-for-unity?pivots=windows

6

there are 2 fixes that I think will help you:

  1. You need to enable IntelliSense by opening Tools -> Options -> Search for Intellisense, and head over to the C# Section and enable features like Show completion list after a character is typed. Options window
  2. For good practice, you should also install the C# packages for Visual Studio 2022. visual studio installer add c# package
4
  • 2
    Any updates? I did those steps but still not working. Not even after reinstall nor update nor nothing.
    – user13698713
    Commented Sep 11, 2022 at 12:59
  • Did you open a C# file? and what plugins are you using? Commented Sep 12, 2022 at 16:30
  • I did everything mentioned in the above explanation. I use the default built-in plugins if I can say that. I created a new C# file in Unity and opened it with VS 2022, but when I try to write anything unity related, it doesn't get 'autocompleted' / 'suggested'. Even when I just try to say "rigidbody" or something, nothing changes, just gives me the regular C# suggestions.
    – user13698713
    Commented Sep 13, 2022 at 17:45
  • stackoverflow.com/a/76298906/5266363 Commented May 21, 2023 at 8:14
5

just reset setting(select Visual C#) https://www.technipages.com/visual-studio-reset-all-settings/

1
  • I have the same issue on intellisense not working, it fix it.
    – N. Alcuino
    Commented Jun 8, 2023 at 8:53
4

I had the same issue lately. Besides the steps mentioned above, in VS, I reloaded the stuff in the solution explorer window manually(mainly Assembly-CSharp), which fixed the issue.

Solution Explorer

1
0

I found out that having a TextBox with both Autocomplete and TextChanged events enabled causes Autocomplete to fail. These two features are mutually exclusive. When Autocomplete is enabled, you must disable TextChanged. You can re-enable TextChanged when you disable Autocomplete.

0

I had the same problem because I was using Visual Studio Code to edit the program (which was set as the default editor in Unity > Edit > preferences > External tools). I changed the default editor to Visual Studio 2022 (which was installed on my computer) and the auto-complete is working properly now!

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.