UnityVS 1.2 (unity3d的Visual Studio可调试插件)

来源:互联网 发布:自学c语言看什么书 编辑:程序博客网 时间:2024/05/20 20:45

Write and debug your Unity games inside Microsoft Visual Studio.
可在Microsoft Visual Studio编写和调试Unity3d脚本。



Debug Unity from Visual Studio, at last.
Put breakpoints, evaluate variables and complex expressions.

Seamless integration.
Use the Unity Project Explorer to find your script with the exact same hierarchy that Unity displays.

Get the Unity console directly inside Visual Studio.

Support for all Unity languages.
Intellisense and code navigation for C#, UnityScript and Boo.

Enhance your productivity.
Use wizards to quickly create or navigate to scripts.

图片:create-script.png

附件名称/大小下载次数最后更新
Unityvs V1.2.zip (2608KB) 21907-15 18:54

安装说明是英文的,我自己翻译了一下。各位看中文部分然后安装就行了。

1. If you have previously installed UnityVS uninstall it now, run ccleaner to remove any left over files & registry keys and reboot.
如果你以前安装过UnityVS的话,先要卸载旧的版本,并且用ccleaner或者360软件管家来确保彻底卸载之后重启电脑。

2. Run UnityVS 2012.msi to install UnityVS
运行UnityVS 2012.msi来安装UnityVS

3. Run "make Dir.bat" as ADMINISTRATOR, if you see any errors then make sure you have admin rights and run it again. 
使用管理员权限运行"make Dir.bat"如果你看到弹出错误提示,那么一定要确保你拥有管理员权限然后再试一次。

4. Right click "copy rhino.bat" and choose edit to open it in notepad
右键单击 "copy rhino.bat" 然后选择“编辑”来用记事本打开这个文件。

5. replace PATH_TO_THIS_DIRECTORY with the directory which you extracted the .bat and "Rhino.Licensing.dll" to. You should end up with something that looks like this 'copy "D:\extracted\Rhino.Licensing.dll" "%SystemRoot%\assembly\GAC_MSIL\Rhino.Licensing\1.2.0.0__0b3305902db7183f"'
将PATH_TO_THIS_DIRECTORY这段文本替换为一个文件路径,这个路径就是你解压你正在编辑的这个.bat文件和的Rhino.Licensing.dll文件的路径。替换完毕后,文本看起来应该是类似这样的:"D:\extracted\Rhino.Licensing.dll" "%SystemRoot%\assembly\GAC_MSIL\Rhino.Licensing\1.2.0.0__0b3305902db7183f"'

6. Save the edit .bat and run it as ADMINISTRATOR, if you get any errors check the file again and make sure it saved correctly. 
保存这个bat文件然后以管理员权限双击运行它,如果你遇到错误提示,请确保你已经保存了这个bat文件。

7. Navigate to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\SyntaxTree\UnityVS" and DELETE the "Rhino.Licensing.dll" File (it should ask you for admin rights to do this)
到 "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\SyntaxTree\UnityVS"目录中然后删除"Rhino.Licensing.dll"。

8. Now move (Cut & paste) the "log4net.dll" file from the current UnityVS Directory to the Visual Studio IDE directory (Go up 3 Directories - "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE")
现在从当前的目录中移动"log4net.dll" 文件到IDE目录,IDE目录也就是当前目录的前面三级。如"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE"(所谓移动就是剪切+粘贴)

9. Launch Visual Studio 2012 (If you get any errors from visual studio at this point or after make sure you've followed every step correctly, if you have uninstall UnityVs, uninstall visual studio 2012, run ccleaner for both temp files and the registry then reboot and start again)
运行VS2012

10. It should now prompt you for your key, open up the key.txt extracted earlier and copy the contents into the box, it should now enable the OK button, click that and you're done!
现在会提示你输入key,打开key.txt,复制所有内容然后粘贴到提示窗口中。
完成注册! 

安装完毕后,如何使用呢?
先到C:\Microsoft 
Visual Studio 
11.0\Common7\IDE\Extensions\SyntaxTree\UnityVS目录(这是我本人的VS安装路径,各位如法炮制找到相应路径即可),导入一个Unity的包

当然了还可以在开始菜单中找到这个包。

导入之后,最好重启一下U3D,之后就能看见菜单栏中多出来的选项了。
然后选择 G.......
之后脚本设置断点调试即可。

原创粉丝点击