Auto Complete Not Working In New Visual Studio 2022 For UNITY
Asked Answered
H

6

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?

Higinbotham answered 1/5, 2022 at 15:19 Comment(0)
D
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
Dyarchy answered 1/5, 2022 at 15:26 Comment(4)
Any updates? I did those steps but still not working. Not even after reinstall nor update nor nothing.Elbertelberta
Did you open a C# file? and what plugins are you using?Dyarchy
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.Elbertelberta
https://mcmap.net/q/1245360/-auto-complete-not-working-in-new-visual-studio-2022-for-unityEzana
C
11

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

Capitalistic answered 15/9, 2022 at 23:57 Comment(0)
D
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
Dyarchy answered 1/5, 2022 at 15:26 Comment(4)
Any updates? I did those steps but still not working. Not even after reinstall nor update nor nothing.Elbertelberta
Did you open a C# file? and what plugins are you using?Dyarchy
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.Elbertelberta
https://mcmap.net/q/1245360/-auto-complete-not-working-in-new-visual-studio-2022-for-unityEzana
E
5

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

Ezana answered 21/5, 2023 at 8:13 Comment(1)
I have the same issue on intellisense not working, it fix it.Partisan
I
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

Irksome answered 11/12, 2023 at 3:34 Comment(1)
Yes, this is all that was necessary for me. I had to right click it and click reload. I also made sure the unity tools were installed before this. learn.microsoft.com/en-us/visualstudio/gamedev/unity/…Vitamin
L
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.

Lora answered 21/2, 2023 at 16:17 Comment(0)
B
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!

Berseem answered 7/9 at 8:30 Comment(1)
Isn't your answer exactly the same as the older one?Fred

© 2022 - 2024 — McMap. All rights reserved.