Ok I updated to VS 2019 I now I can select this:
But now I get this option:
I don’t know what to do here. The “OK” button is greyed out :-(. Any help?
Ok I updated to VS 2019 I now I can select this:
But now I get this option:
I don’t know what to do here. The “OK” button is greyed out :-(. Any help?
Can you select Evolution position?
Aaah… yeah I might have tried that myself… Oh well it did the trick. Thanks alot!
Well actually it works a little odd. When I select Evolution it starts debugging, and when I start in Unity it will run the scripts and get stuck in the breakpoints as it should. But when I stop again the debugging also stops and I can edit the code again. But I then have to do all the same stuff again if I want to run in debugging mode again. That’s pretty annoying. Isn’t there a way to always start the debugger in VS when I run in Unity without a lot of manual stuff?
Technically once you attach, it should stay attached.
But as far I have experienced unfortunately, Latest Unity with VS is quite temperamental.
Which version of Unity you are using?
version 2019.2.0f1
You should only need to press F5 (Or Start button) to attach to your Editor in your case.
Using “Attach to Unity debugger” is useful when:
Seb
Is not always true, since VS sometimes don’t want to attach at all. Restarting both Unity and VS is best remedy in my case.
However, I
am not sure if that is more VS, or actually Python related, as I had been installing recently python and had some conflicts with VS version of python. Coincidentally I upgraded Unity to 2019 at the same period. And VS Unity attaching troubles become more often since then.
Reinstalling VS didn’t help.
i fixed this by going to edit > preferences > and checking the bool next to ‘Player Projects’ under ‘generate .csproj files for:’ and clicking ‘Regenerate project files’ button. The other stuff did not work for me
I have this problem sometimes. Try deleting the .sln file created in your project folder (where you see your assets and library…etc). It fixed it for me
Try to delete de .csproj and .sln files. Unity will regenerate those files. That worked for me.
I founded one solution which might work for all cases. 1. Just start any version of VS separately from Unity. 2. Open solution file which is previously generated for project. 3. Open Unity, and double click on any script. It will be opened in VS and Attach will be there.
Note: I have project in Unity 5 and was working with VS 2017. Sln file is generated by VS 2017. And now on this way I can use VS 2019 and VS 2022 normaly.
Perfect solution, thanks