2

I'm pretty sure that this must be easy for someone that have experience with VS and Unity, but I couldn't find a solution on Google. I probably typed some shortcut by mistake that changed the "Attach to Unity" button on top of the window by "Start" button. Besides that, Unity methods are faded for some reason. Strangely, it doesn't seems to have any other problems for now, I can run my project without any errors and the intellisense seems to be working normally, but I would like to solve this thing even so. I'm afraid that this cause issues in the future, maybe I didn't notice some limitation or problem that this "setting" brings. Already tried to reboot the systems and repair the VS, but this issue remains. If I create another project, the "Attach to Unity" button is there like it should and the Unity methods are blue and not greyed out.

For those that didn't visualize what I meant, here's an image:

  • Did you try to regenerate the Visual Studio project? Also, Unity methods will be always grayed out unless you have a plugin. – Tomasz Juszczak Sep 12 '20 at 16:11
  • Thanks for the answer, I don't know how regenerate the project, tried to google this and didn't find anything. About the methods, I didn't know that, greyed out methods for me implies that the method is not being used or something. – Gabriel Minosso Sep 12 '20 at 16:50

2 Answers2

1

This solution works for me:

Visual Studio loses ability to attach to Unity, why?

To make it short, just:

Unity > Edit > Preferences > External Tools
Click on "Regenerate project files" 

There are many opnions in the thread above, which help me learn about the problem.

I think it is also good for you if you read the thread.

AdmiralOrange
  • 157
  • 1
  • 14
0

After take a closer look on the the menus I solved the issue attaching the debugger to the project again on the "Debug" menu, using the "Attach to process..." option.