1

I don't know what started it - maybe an update to the Unity Engine or the Visual Studio Tools for Unity (because I can't remember that I've updated Visual Studio itself) - but since a couple of weeks, my Visual Studio auto completion got basically incompatible with Unity.

I used to write "void A" to tab-complete it to

void Awake() {

}

but now it get's auto-completed to

private void Awake() {

}

Has anyone got an idea what caused this and how to change it back? It just get's annoying to remove the 'private' access modifier every time I autocomplete a standard Unity method.

Tavados
  • 2,168
  • 3
  • 14
  • 27
  • Although potentially annoying, is there any reason why this is causing problems? Methods are private by default, so `void Awake()` and `private void Awake()` should not result in any difference in your code execution... – Serlite Feb 21 '17 at 16:36
  • Afaik it is not causing problems, but...habits. I guess you can relate, maybe when talking about whether the "{" has to be in the same line or in the next. Imagine your IDE suddenly switching from what you're used to. :( – Tavados Feb 21 '17 at 16:52
  • 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) – amitklein May 11 '21 at 07:38

1 Answers1

5

The update changes some settings. I just noticed that now but don't have problems with it.

Go to Tools --> Options. Select Tools for Unity then change Unity Messages scope from Private to Default. Click Ok and exit.

enter image description here

Programmer
  • 121,791
  • 22
  • 236
  • 328