0

While I was coding a script for a game object in unity, I noticed the absence of autocomplete that appear while coding.

For instance : gameObject.[list of possible commands]

Visual Studio Code will still suggest me commands while coding normal C#, or Python. But when I want to use commands which are used to change something which concerns anything inside unity (For example : the name of the gameObject, or the velocity of the gameObject), no options will appear. This issue does not occur in Visual Studio ONLY in VS Code.

This is what I see : enter image description here

As you can see no dropdown of suggestions/options.

PS: I have set the external script editor in unity to VS Code. PS 2 : I am not using VS Code in Restricted Mode. PS 3: I have restarted Unity and it still didn't fix the problem.

How can I fix that and make the dropdown list appear ?

  • Does this answer your question? [Unity Scripts edited in Visual studio don't provide autocomplete](https://stackoverflow.com/questions/42597501/unity-scripts-edited-in-visual-studio-dont-provide-autocomplete) – Jay May 20 '23 at 20:05
  • I tried what they suggested, yet it didn't work – Emile Youssef FEGHALI EL May 20 '23 at 20:06
  • Be sure to put what you have tried already in your question. See [how to ask](https://stackoverflow.com/help/how-to-ask) – Jay May 20 '23 at 20:08
  • see also https://stackoverflow.com/q/76534533/11107541 and https://stackoverflow.com/q/76438993/11107541 – starball Aug 22 '23 at 05:24

2 Answers2

0

OK, I found a solution to my problem. Just go to VS Code Extensions and download the "C# Extension pack". Now autocomplete works.

0

Here is a solution. Installing the .NET Extension Pack has the autocomplete working fine and as expected.