Unity说明文档翻译-Visual Studio C# Integration

Visual Studio C# Integration

Visual Studio C# 集成

What does this feature get me?

这个特性带给了我什么?

A more sophisticated C# development environment. Think smart autocompletion, computer-assisted changes to source files, smart syntax highlighting and more.

一个更复杂的C#开发环境.考虑到时髦的自动补齐,计算机帮助改为源文件,醒目的语法高亮和更多.

What’s the difference between Express and Pro?

Express版本和Pro版本有什么不同?

VisualStudio C# 2010 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.

Visual Studio C#2010是一个来自微软的产品.它带有一个Express版本和一个Profesional版本.Express版本是免费的.

The Professional edition is not free, you can find out more information about it here.

Professional版本是收费的.

Unity’s VisualStudio integration allows you to create and maintain VisualStudio project files automatically. Also, VisualStudio will open when you double click on a script or on an error message in the Unity console.

Unity的Visual Studio集成允许你自动创建和和维护VS项目文件.另外当你双击一个脚本或一个Unity控制台错误时VS将打开.

I’ve got Visual Studio Express, how do I use it?

我有了VS Express,如何使用它?

In Unity, select from the menu Assets->Sync MonoDevelop Project

Unity内,从菜单选择资源>同步MonoDevelop项目.

Find the newly created .sln file in your Unity project (one folder up from your Assets folder)

找到你的Unity项目中最近创建的.sln文件(一个来自你的资源文件夹内的一个文件夹)

Open that file with Visual Studio Express.

使用vs Express打开此文件

You can now edit all your script files, and switch back to Unity to use them.

现在你可以编辑所有你的脚本了,且切换回Unity来使用它们.

I’ve got Visual Studio Profesional, how do I use it?

我有了VS pro,我该如何使用它?

In Unity, go to Edit->Preferences, and make sure that Visual Studio is selected as your preferred external editor.

Unity内,到编辑>首选项,并确保vs被选为你的指定外部编辑器.

Doubleclick a C# file in your project. Visual Studio should automatically open that file for you.

双击你项目内的一个C#文件.vs将自动给你打开此文件.

You can edit the file, save, and switch back to Unity.

你可以编辑此文件,保存和切换回Unity.

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.

尽管vs自带C#编译器,并且你可以使用它来检查你的c#脚本错误,Unity依然使用它自己的C#编译器编译你的脚本.使用vs编译器依然很有用,因为它意味着你不再需要总是切换到Unity检测你是否存在错误.

 

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.

Vs的C#编译器比Unity当前的编译器有一些更好的特性.这意味着一些代码(特别是更新的C#特性)在vs中将不会报错,而在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自动创建和维护一个vs.sln和.cspro文件.无论何时某人从Unity内添加/重命名/移动/删除一个文件,Unity都会更新.sln和.cspro文件.你也可以从vs添加文件到你的解决方案.Unity随后将导入这些新文件,并且下次Unity再次创建这个项目文件,它将包含这个新文件一起创建.

 

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 MonoDevelop Project

Unity在资源服务器更新或SVN更新后不再更新vs项目文件.你可以通过菜单:资源>同步MonoDevelop项目,手动叫Unity去更新这个vs项目文件.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值