How to Solve: Visual Studio doesn't autocomplete in Unity

Introduction

In this arti­cle we see how to solve the Visu­al Stu­dio error in which it does not auto­com­plete code, that is to say, it does not rec­og­nize the engine's own com­po­nents such as the GameOb­ject, Com­po­nent or Rigid­Body class, this makes the pro­gram­ming task very hard.

CHECK OUT THIS CRAZY EXPERIMENT

How to connect Visual Studio to Unity to make autocomplete work

First make sure that Visu­al Stu­dio is installed, if this was not done at the time of installing Uni­ty, you can install it by going to Uni­ty HUB, to the "Installs" sec­tion and adding the Visu­al Stu­dio mod­ule to the ver­sion of the engine you are using.

If Visu­al Stu­dio is installed but still does not sug­gest us code we have to make sure that Visu­al Stu­dio is con­nect­ed to Uni­ty, for that in Uni­ty we go to Edit > Pref­er­ences > Exter­nal Tools. In the Script edi­tor part, using the drop-down menu choose "Visu­al Stu­dio" (if this option does not appear it may indi­cate that Visu­al Stu­dio is not installed), you can also use the "Browse" option to locate the exe­cutable of the edi­tor you want to use.

Once this is done Visu­al Stu­dio will start auto­com­plet­ing code relat­ed to the Uni­ty engine, such as GameOb­ject, Col­lid­er or Rigid­Body components.

YouTube
Scroll to Top
Secured By miniOrange