Unity配合VS2012来使用的一些插件集合

来源:互联网 发布:在线教育 知乎 编辑:程序博客网 时间:2024/05/14 12:23

shader相关:

插件:NShader,可以在VS2012中改变shader各种关键字的颜色,就不再是原来那种单一色调了。唔。。原来那个看的眼睛都花了- -||

下载地址及使用方法:http://forum.unity3d.com/threads/108995-Tutorial-How-to-use-NShader-with-Unity-shaders

VS2012需要将

[$RootKey$\Languages\File Extensions\.shader]
@="{479b8c71-c9de-3669-869d-ae1d91602d7c}"


这个脚本换成

[$RootKey$\Languages\File Extensions\.shader]
@="{4c554917-0eb7-3742-9f6b-f2f529fc6729}"


并且路径在<VsInstallRootFolder>\Common7\IDE\Extensions\之后的NShader文件夹会是一个随机值,直接在当前目录搜索NShader.pkgdef这个文件就可以了。

之后直接重启VS就能使用了,在工具->选项->字体和颜色中可以自定义shader文本。

如果shader文本的颜色没有发生改变,请进入注册表中删除


这两个节点,注意中间的11.0是VS的版本,找到对应的节点删除就行了。

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ 11.0\FontAndColors\Cache
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ 11.0_Config


调试相关:

插件:UnityVS 1.8

下载地址:http://pan.baidu.com/s/1hqC8V1y

安装及使用方法(原文档是英文的,我大概翻译了一下):

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
运行UntiyVS 2012.msi


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这一句话替换成Rhino.Licensing.dll这个文件所在的路径。这一步完成之后copy rhino.bat的内容看起来应该像这个样子:'copy "D:\extracted\Rhino.Licensing.dll" "%SystemRoot%\assembly\GAC_MSIL\Rhino.Licensing\1.2.0.0__0b3305902db7183f"' 其中"D:\extracted\Rhino.Licensing.dll"是你替换的部分,如果没有引号的话记得加上引号。

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.
保存,退出,双击运行这个文件。如果报错请确保第5步没有问题,然后再试一次。

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,如果报错的话请将UntiyVS和VS2012都卸载干净重新来一次(OMG...我反正是没出任何问题)

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,复制所有内容然后粘贴到提示窗口中。这样就应该能成功进去了。


使用方法:

新建一个Unity3D的工程,然后进入到UnityVS的安装目录:%VS2012安装路径%\Common7\IDE\Extensions\SyntaxTree\UnityVS中,找到UnityVS 2012.unitypackage这个文件导入到Unity3D中,等待编译结束,之后选择edit->perferencesexternal tools中选择脚本文档的打开方式为UnityVS.OpenFile

然后新建一个C#脚本文件拖给一个物体,打开它随便写点东西打几个断电然后点击VS2012中的启动或者直接按F5(如果你没改按键的话),等待就绪之后返回Unity3D运行工程应该就可以进入断电了。嗯,大概就是这样。渣排版见谅~~

0 0
原创粉丝点击