Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
344 views
in Technique[技术] by (71.8m points)

c# - Visual Studio loses ability to attach to Unity, why?



I'm using Visual Studio with Unity. In general in VS I can simply click "Attach to Unity" and it will build the solution and indeed attach to Unity. Sometimes, however, a project loses the "ability" to do so, what means that suddenly clicking the button will only build the solution and not attach to Unity. I really would like to know what's happening there as I'm not aware of doing anything that could result in such a behaviour.
There are some parameters that might have an effect:

  • it happens only for some Unity projects: a project is either "infected" or it happens never (on my watch)
  • if it starts happening it will always happen until I reboot the PC (closing VS and Unity is not enough)

Thank you

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

For me "Attach to Unity" disappeared from the toolbar.

enter image description here

But I still have a button in Debug -> Attach Unity Debugger

enter image description here

Hope it will help someone.

Visual Studio Community 2019 16.7

Unity 2020.1.2f1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...