UNITY5.2如何使用VSTools调试

误区声明

百度上需要博客都用了一种先安装UnityVS1.8.2或者UnityVs1.9,然后在Unity中导入UnityVS,接着填写UnityVS License的方法。这是Unity旧版本的方法,新的版本中,几个步骤你都可以做,但是到了填写License那一步,VS就会一直提示你License无效。

正确方法

  1. 确认自己的Unity版本,Unity5.2及以上
  2. 确认自己的VS版本
    VS2015,对应UnityVS请下载[http://download.csdn.net/detail/follow_dream_lgx/9409666]

    VS2013,对应UnityVS请下载[http://download.csdn.net/detail/follow_dream_lgx/9409662]

    VS2012,对应UnityVS请下载[http://download.csdn.net/detail/follow_dream_lgx/9409675]

    VS2010,对应UnityVS请下载[http://download.csdn.net/detail/follow_dream_lgx/9409670]

  3. 打开msi文件,直接安装
  4. 打开Unity,在菜单栏 Help/AboutUnity中假如能看到下图,标明安装成功。


在Unity的Edit/Preference中设置脚本打开方式


调试步骤

  1. 随意打开一个可能运行的脚本,窗口跳到VS界面
  2. 在VS中连接Unity,点击Attach to Unity。并在一句可能运行到的代码设置断点
  3. 在Unity中运行,并设法触发断点处的代码
  4. 成功停留在断点

猜你喜欢

转载自blog.csdn.net/brucethl/article/details/81390095
5.2
今日推荐