用visual studio当做unity3D脚本编辑器
2011-05-22 19:48
232 查看
Visual Studio C# Integration
What does this feature get me?
A more sophisticated C# code writing environment.
Think smart autocompletion, computer assisted changes to your codefiles, smart syntax highlighting and more.
What’s the difference between Express and Pro?
VisualStudio C# 2008 is a product from Microsoft. It comes in an Express and a Profesional edition.
The Express edition is free, and you can download it from here: http://www.microsoft.com/express/vcsharp/ The Professional edition is not free, you can find out more information about it here: http://www.microsoft.com/visualstudio/en-us/products/professional/default.mspx
Unity’s VisualStudio integration has two components:
1) Unity creating and maintaining VisualStudio project files. Works with Express and with Profesional.
2) Unity automatically opening VisualStudio when you doubleclick on a script, or error in Unity. Works with Profesional only.
I’ve got Visual Studio Express, how do I use it?
In Unity, select from the menu Assets->Sync VisualStudio Project
Find the newly created .sln file in your Unity project (one folder up from your Assets folder)
Open that file with Visual Studio Express.
You can now edit all your script files, and switch back to Unity to use them.
I’ve got Visual Studio Profesional, how do I use it?
In Unity, go to Edit->Preferences, and make sure that Visual Studio is selected as your preferred external editor.
Doubleclick a C# file in your project. Visual Studio should automatically open that file for you.
You can edit the file, save, and switch back to Unity.
Does this work with other versions than Visual Studio C# 2008?
We’ve tested against Visual Studio 2008 and a prerelease version of Visual Studio 2010. At the time of this release, Visual Studio 2010 was not yet released, so we’re not sure if Unity will work nicely with Visual Studio 2010 once it is released.
A few things to watch out for:
Even though Visual Studio comes with its own C# compiler, and you can use it to check if you have errors in your c# scripts, Unity still uses its own C# compiler to compile your scripts. Using the Visual Studio compiler is still quite useful, because it means you don’t have to switch to Unity all the time to check if you have any errors or not.
Visual Studio’s C# compiler has some more features than Unity’s C# compiler currently has. This means that some code (especially newer c# features) will not give an error in Visual Studio but will give an error in Unity.
Unity automatically creates and maintains a Visual Studio .sln and .csproj file. Whenever somebody adds/renames/moves/deletes a file from within Unity, Unity regenerates the .sln and .csproj files. You can add files to your solution from Visual Studio as well. Unity will then import those new files, and the next time Unity creates the project files again, it will create them with this new file included.
Unity does not regenerate the Visual Studio project files after an AssetServer update, or a SVN update. You can manually ask Unity to regenerate the Visual Studio project files trough the menu: Assets->Sync VisualStudio Project.
What does this feature get me?
A more sophisticated C# code writing environment.
Think smart autocompletion, computer assisted changes to your codefiles, smart syntax highlighting and more.
What’s the difference between Express and Pro?
VisualStudio C# 2008 is a product from Microsoft. It comes in an Express and a Profesional edition.
The Express edition is free, and you can download it from here: http://www.microsoft.com/express/vcsharp/ The Professional edition is not free, you can find out more information about it here: http://www.microsoft.com/visualstudio/en-us/products/professional/default.mspx
Unity’s VisualStudio integration has two components:
1) Unity creating and maintaining VisualStudio project files. Works with Express and with Profesional.
2) Unity automatically opening VisualStudio when you doubleclick on a script, or error in Unity. Works with Profesional only.
I’ve got Visual Studio Express, how do I use it?
In Unity, select from the menu Assets->Sync VisualStudio Project
Find the newly created .sln file in your Unity project (one folder up from your Assets folder)
Open that file with Visual Studio Express.
You can now edit all your script files, and switch back to Unity to use them.
I’ve got Visual Studio Profesional, how do I use it?
In Unity, go to Edit->Preferences, and make sure that Visual Studio is selected as your preferred external editor.
Doubleclick a C# file in your project. Visual Studio should automatically open that file for you.
You can edit the file, save, and switch back to Unity.
Does this work with other versions than Visual Studio C# 2008?
We’ve tested against Visual Studio 2008 and a prerelease version of Visual Studio 2010. At the time of this release, Visual Studio 2010 was not yet released, so we’re not sure if Unity will work nicely with Visual Studio 2010 once it is released.
A few things to watch out for:
Even though Visual Studio comes with its own C# compiler, and you can use it to check if you have errors in your c# scripts, Unity still uses its own C# compiler to compile your scripts. Using the Visual Studio compiler is still quite useful, because it means you don’t have to switch to Unity all the time to check if you have any errors or not.
Visual Studio’s C# compiler has some more features than Unity’s C# compiler currently has. This means that some code (especially newer c# features) will not give an error in Visual Studio but will give an error in Unity.
Unity automatically creates and maintains a Visual Studio .sln and .csproj file. Whenever somebody adds/renames/moves/deletes a file from within Unity, Unity regenerates the .sln and .csproj files. You can add files to your solution from Visual Studio as well. Unity will then import those new files, and the next time Unity creates the project files again, it will create them with this new file included.
Unity does not regenerate the Visual Studio project files after an AssetServer update, or a SVN update. You can manually ask Unity to regenerate the Visual Studio project files trough the menu: Assets->Sync VisualStudio Project.
相关文章推荐
- VS2017做为Unity3D的脚本编辑器需要的最精简组件
- 编辑器中添加菜单以及菜单项 【unity3d脚本】
- 扩展Unity3D编辑器的脚本模板
- VS2017做为Unity3D的脚本编辑器需要的最精简组件
- Visual Studio 2008 中的JS脚本编辑器
- Unity3D Script脚本编辑器属性
- 用visual studio来编写Unity3D脚本
- 如何使用Visual Studio调试Unity3D脚本
- unity3D学习之Mono Develop脚本编辑器和常用核心类
- Visual Studio 2008 中的JS脚本编辑器
- 【Unity3D】设置脚本的默认编辑器、默认IDE
- unity3d编辑器界面扩展,编辑状态下显示选择对象的所有脚本组件代码内容
- Unity3D编辑器:删掉MissingScirpt脚本
- Unity3D应用随笔,选择默认脚本编辑器
- Unity3D编辑器之脚本打开SpritePacker窗口
- 扩展Unity3D编辑器的脚本模板
- Unity3D实践系列03,使用Visual Studio编写脚本与调试
- Unity3D之编辑器脚本获取资源内存和硬盘大小
- Unity3D学习之(脚本编辑器实现各种类的操作)
- 扩展Unity3D编辑器的脚本模板