unity2018.3.1_更新了Unity 2018.1中的脚本运行时:未来将如何发展?

unity2018.3.1_更新了Unity 2018.1中的脚本运行时:未来将如何发展?

unity2018.3.1

Unity 2018.1 beta now includes a fully-supported, modern .NET runtime. As the .NET ecosystem continues to evolve, Unity is committed to maintaining feature compatibility with the latest and greatest in the .NET world.

Unity 2018.1 beta现在包括一个完全受支持的现代.NET运行时。 随着.NET生态系统的不断发展,Unity致力于与.NET世界中的最新和最强大的功能保持兼容性。

我们是怎么来到这里的? (How did we get here?)

In Unity 2017.1, we shipped the first experimental preview of the stable scripting runtime. Throughout the 2017.2 and 2017.3 release cycle, many Unity users worked with this experimental scripting runtime and provided invaluable feedback (thanks, everyone!). We’ve also worked closely with excellent developers from Microsoft, both on the Mono and Visual Studio teams. As we’ve sorted out issues and corrected bugs, the modern scripting runtime has become more and more stable. In 2018.1 we feel it is ready for widespread use. So if you’ve not tried it yet, please do so now!

在Unity 2017.1中,我们发布了稳定脚本运行时的第一个实验性预览。 在2017.2和2017.3发行周期中,许多Unity用户使用此实验性脚本运行时环境,并提供了宝贵的反馈(感谢大家!)。 我们还与Mono和Visual Studio团队中的Microsoft优秀开发人员紧密合作。 随着我们对问题的解决和错误的纠正,现代脚本运行时变得越来越稳定。 在2018.1中,我们认为它已准备好广泛使用。 因此,如果您尚未尝试过,请立即尝试!

我为什么要尝试呢? (Why should I try it?)

The stable scripting runtime brings a number of modern C# and .NET features to Unity. Specifically, you’ll get access to:

稳定的脚本运行时为Unity带来了许多现代C#和.NET功能。 具体来说,您将可以访问:

  • C# 6

    C#6
  • The .NET 4.7.1 class libraries

    .NET 4.7.1类库
  • Support for assemblies built against .NET Standard 2.0 and 1.x

    支持针对.NET Standard 2.0和1.x构建的程序集
  • Managed code debugging with IL2CPP (experimental in 2018.1 for standalone players, expect full support in the next few releases)

    使用IL2CPP进行托管代码调试(在2018.1中针对独立播放器进行实验,期望在以后的几个版本中提供全面支持)

我应该使用什么.NET配置文件? (What .NET Profile should I use?)

The stable scripting runtime comes with two new .NET profiles. A .NET profile defines the API surface your code can use for the .NET class libraries. You can choose the .NET profile for your player build via the “Api Compatibility Level” option in the Player Settings. The two .NET profiles Unity supports are

稳定的脚本运行时带有两个新的.NET配置文件。 .NET配置文件定义了您的代码可用于.NET类库的API表面。 您可以通过“播放器设置”中的“ Api兼容性级别”选项为播放器版本选择.NET配置文件。 Unity支持的两个.NET配置文件是

  • .NET Standard 2.0

    .NET标准2.0
  • .NET 4.x.

    .NET4.x。

The .NET Standard 2.0 profile matches the profile of the same name published by the .NET Foundation. This is a great profile to choose for a new Unity project. It is smaller than .NET 4.x and we recommend it for size-constrained platforms such as mobiles. In addition, we’ll make sure this profile works on all platforms Unity supports. If you are a developer of libraries used with Unity, this is the profile you want to target.

.NET Standard 2.0配置文件与.NET Foundation发布的同名配置文件匹配。 这是为新的Unity项目选择的绝佳配置文件。 它比.NET 4.x小,建议将其用于尺寸受限的平台(例如移动设备)。 此外,我们将确保该配置文件在Unity支持的所有平台上均有效。 如果您是与Unity一起使用的库的开发人员,则这是您要定位的配置文件。

unity2018.3.1_更新了Unity 2018.1中的脚本运行时:未来将如何发展?

The .NET 4.x profile provides access to the latest .NET 4 API. This includes all of the code available in the .NET Framework class libraries. It also supports all of the .NET Standard 2.0 profiles, so it will work with managed plugin assemblies built against .NET Standard 2.0. While it provides access to a large API, some parts of that API will not work on all platforms. If your project requires functionality not exposed in .NET Standard or has legacy code, this may be a good option.

.NET 4.x配置文件提供对最新.NET 4 API的访问。 这包括.NET Framework类库中所有可用的代码。 它还支持所有.NET Standard 2.0配置文件,因此它将与针对.NET Standard 2.0构建的托管插件程序一起使用。 虽然它提供了对大型API的访问,但该API的某些部分将无法在所有平台上正常工作。 如果您的项目需要.NET Standard中未公开的功能或具有旧版代码,则这是一个不错的选择。

未来该何去何从? (What does the future hold?)

Now that the modern scripting runtime is fully supported, we’re committing to maintain it for all future versions of Unity. We’re also working on TLS 1.2 support across all platforms and improvement in build size and build times with the modern scripting runtime.

现在已经完全支持现代脚本运行时,我们致力于为所有将来的Unity版本维护它。 我们还致力于在所有平台上支持TLS 1.2,并通过现代脚本运行时来改善构建大小和构建时间。

The legacy scripting runtime will remain the default for new projects in 2018.1. During the 2018.x release cycle, we will change the default scripting runtime for new projects to be the stable scripting runtime. We will deprecate the legacy scripting runtime, although it will be fully supported for existing projects.

旧脚本运行时将仍然是2018.1中新项目的默认运行时。 在2018.x发布周期中,我们会将新项目的默认脚本运行时更改为稳定的脚本运行时。 尽管现有项目将完全支持旧版脚本运行时,但我们将弃用它。

We are aggressively working to remove the legacy scripting runtime, and make the stable scripting runtime the only option. We recommend all users start the process of migration to the stable scripting runtime soon. As our focus shifts to the stable scripting runtime, we limit the bugs fixed in the legacy scripting runtime. Additional guidance will follow about the deprecation and removal schedule for the legacy scripting runtime.

我们正在积极努力删除旧版脚本运行时,并使稳定脚本运行时成为唯一选择。 我们建议所有用户尽快开始迁移到稳定的脚本运行时。 随着我们的重点转向稳定的脚本运行时,我们限制了旧脚本运行时中修复的错误。 其他指南将遵循有关旧脚本运行时的弃用和删除时间表。

unity2018.3.1_更新了Unity 2018.1中的脚本运行时:未来将如何发展?

At Unity, we’re excited about the recent evolution of the larger .NET ecosystem. As it continues to improve we’re dedicated to bringing the latest .NET tools to Unity developers, like C# 7, so stay tuned!

在Unity,我们对更大的.NET生态系统的最新发展感到兴奋。 随着它的不断改进,我们致力于为Unity开发人员(如C#7)带来最新的.NET工具,敬请期待!

We’re looking forward to discussing our runtime upgrade and upcoming scripting features in this corner of Unity Forums!

我们期待 Unity论坛的这个角落讨论我们的运行时升级和即将发布的脚本功能!

翻译自: https://blogs.unity3d.com/2018/03/28/updated-scripting-runtime-in-unity-2018-1-what-does-the-future-hold/

unity2018.3.1