OnTriggerEnter2D Not Highlighting was did not AutoComplete

So I saw that there was a post here about this and tried everything mentioned but my it is still not working. I started by cleaning my solution and rebooting Visual Studio, creating a new script to see if it was just it being stubborn, checked to see if my options look like Rob’s and then I tried restarting all of Unity and nothing worked. However, I am still able to proceed to the game over slide when the ball drops through.
Any ideas on what is wrong? Here is the picture from the other post but my code looks the same.
https://community.gamedev.tv/uploads/short-url/kK88ZjNUD04yClXO9yGnstWfu70.png

Hi,

Which version of VS do you use? If it’s VS 2019, missing descriptions and no autocompletation are a known issue. In this case, install VS 2017 and select it as your External Script Editor in Unity (Edit > Preferences > External Tools).

I am running VS 2017 version 15.9.12

Please try the following suggestions:

  1. Restart Unity and VS.
  2. Is Visual Studio selected as your External Script Editor in Unity (Edit > Preferences > External Tools)?
  3. Are the Unity development tools installed in VS (Tools > Extensions and Updates)? If they are not installed, go to Tools > Get Tools and Features.
  4. Reboot your PC.
  5. Close both Unity and VS. Go to your project folder and delete all sln and csproj files. Then start Unity again, double click on the script file inside your Assets folder in Unity.
  6. Try to update VS.
  7. Try to update Unity.

Did any of these fix the issue for you?

Did them all and it is still not showing up highlighted. At least my project works though, so I can continue to move through the course.

Your first screenshot shows some words highlighted, e.g. MonoBehaviour. Isn’t that the case anymore?

Weird, but before I just checked everything but OnTriggerEnter2D was still highlighting. However, everything is now highlighted again even OnTriggerEnter2D is now highlighted. My computer did an update last night but that is the only thing that changed from everything I tried yesterday. Thanks for all the tips though

Maybe you had an outdated .NET version or something else that was relevant got updated. Whatever it was, I’m glad it’s finally working. This is how the highlighted code is supposed to look. :slight_smile:


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.