这是我自己摸索出的方法,直接只通过使用VS,甚至不通过Unity直接断点调试手机上Unity实例,不得不承认vs的强大
我使用的是VS2017,不清楚其他版本VS是否也有这个功能
首先在电脑使用一个wifi软件开个wifi给自己的手机,然后在vs中点击调试,再点击附加Unity调试程序
如果看不到这个选项,你恐怕需要重新Vs,把Unity相关组件安装上
选择一个实例,点击确定,之后就可以进行断点调试,是不是很方便
(我这边有2个实例,一个跑在安卓虚拟机上,一个用wifi连接,我虚拟机上的实例只能被Vs检测到,却不能成功用vs连接进行断点调试,而我这边电脑配置太差,一个unity,一个Tim,一个浏览器,一个vs,基本是极限了,再加个虚拟机,电脑真心容易崩,所以也不折腾了,不过如果大家成功连接上了虚拟机,希望能告知方法。)
注意:unity导出安卓程序配置需要如下
必须安装上图勾选,否则VS无法检测的unity导出的安卓游戏