可位寻址跟不可位寻址的区别_可寻址资产系统

可位寻址跟不可位寻址的区别_可寻址资产系统

可位寻址跟不可位寻址的区别

Addressables is a Unity Editor & runtime asset management system that improves support for large production teams with complex live content delivery needs. This release marks a major milestone in our journey to relieve developer pain while also bringing live content capabilities within reach of smaller teams less equipped to tackle the engineering challenges. Addressables is now out of preview [1] and will be available as a verified package for Unity 2019.3. It will remain fully supported in Unity 2018 LTS releases.

Addressables是一个Unity编辑器和运行时资产管理系统,可改善对具有复杂实时内容交付需求的大型生产团队的支持。 此版本标志着我们在减轻开发人员痛苦的过程中的一个重要里程碑,同时也将实时内容功能带入了能力不足以应对工程挑战的小型团队。 现在,可寻址对象已不在预览[1]中,并将作为Unity 2019.3的经过验证的软件包提供。 Unity 2018 LTS发行版仍将完全支持它。

背景 (Background)

In Unity 4, Asset Bundles were introduced as a low-level mechanism for building assets into discrete units for dynamic loading at runtime. Implementing Asset Bundles enables developers to separate content from the app install. This provides the ability to deliver regular content updates to live apps with a small initial download size, while staying below the over-the-air install limit as additional app content is added.

在Unity 4中,引入了资产捆绑包作为一种低级机制,用于将资产构建为离散的单元,以便在运行时动态加载。 实施资产捆绑包使开发人员能够从应用程序安装中分离内容。 这提供了以较小的初始下载大小向实时应用交付常规内容更新的功能,同时随着添加其他应用内容而保持在无线安装限制以下。

Despite these benefits, utilizing Asset Bundles in a real production is a complex task. There are no obvious workflows in Unity for transitioning content to Asset Bundles from the simple mechanisms of referencing and loading assets in Unity – through direct references in scenes and public fields of GameObjects. Transitioning an app or game from utilizing purely static, built-in content to one with the ability to load content dynamically with incremental updates requires a large amount of refactoring and custom programming. This capability has therefore remained out of reach for many, if not most, developers.

尽管有这些好处,但在实际生产中利用资产捆绑包是一项复杂的任务。 Unity中没有明显的工作流,可以通过在Unity中引用和加载资产的简单机制(通过GameObjects场景和公共领域中的直接引用)将内容转换为Asset Bundles。 将应用程序或游戏从纯粹的静态内置内容转换为能够通过增量更新动态加载内容的功能,需要大量的重构和自定义编程。 因此,对于许多(即使不是大多数)开发人员来说,这种能力仍然遥不可及。

可寻址 (Addressables)

What we found when talking to developers about their experience using Asset Bundles was that almost everyone doing so successfully were more or less writing the same high level systems a thousand slightly different ways. Addressables was born out of this obvious need for a framework to solve a set of common problems related to addressing, building, and loading assets.

当与开发人员谈论他们使用Asset Bundle的经验时,我们发现,几乎每个成功这样做的人或多或少都以一千种略有不同的方式编写了相同的高级系统。 可寻址对象诞生于对解决与寻址,构建和加载资产相关的一系列常见问题的框架的明显需求。

关注点分离:引用与包装资产 (Separation of Concerns: Referencing vs. Packaging Assets)

The primary function of Addressables is to separate what assets are being loaded from where and how those assets are loaded. Any asset, including scenes, prefabs, text assets, etc. can be marked as addressable, and given a unique name. Once addressable, an asset can be referenced and loaded by its addressable name in code and through a special Asset Reference script type. Separately, Addressable assets can be grouped together for building and loading as built-in content or into bundles for loading dynamically at runtime. It’s through this separation of concerns that decisions about content packaging and distribution can be deferred to later in production without requiring changes to the game code.

Addressables的主要功能是分离 正在从 何处 以及 如何将 这些资产被加载 加载 哪些 资产 。 任何资产,包括场景,预制件,文本资产等,都可以标记为 可寻址 ,并赋予唯一的名称。 一旦可寻址,就可以通过代码中的可寻址名称并通过特殊的“ 资产引用” 脚本类型 来引用和加载 资产 。 另外,可寻址资产可以分组在一起以作为内置内容进行构建和加载,也可以分为捆绑包以在运行时动态加载。 通过这种关注分离,可以将内容打包和分发的决定推迟到以后的生产中,而无需更改游戏代码。

可位寻址跟不可位寻址的区别_可寻址资产系统

The Addressables window

可寻址窗口

运行时内存管理 (Runtime Memory Management)

A key advantage of loading from Asset Bundles in Unity is that they provide an efficient means to unload no longer needed content from memory. Effectively keeping track of what is loaded and what can be safely unloaded is a complicated coding task previously left to the developer. Loading through Addressables automatically provides high level reference counting of loaded assets and their dependencies and can automatically unload bundles and their associated assets when no longer in use. Additionally, Addressables provides a visual profiler for real-time debugging of loaded asset and Asset Bundle reference counts.

从Unity中的资产捆绑包加载的主要优势在于,它们提供了一种 从内存中 卸载 不再需要的内容 的有效方法 。 有效地跟踪加载了什么以及可以安全卸载的是先前留给开发人员的复杂编码任务。 通过可寻址对象进行加载会自动提供已加载资产及其依存关系的高级参考计数,并且在不再使用捆绑软件及其相关资产时会自动卸载。 此外,Addressables提供了可视化探查器,用于实时调试已加载资产和资产捆绑包参考计数。

可位寻址跟不可位寻址的区别_可寻址资产系统

The Addressables Profiler

可寻址分析器

Faster Iteration

更快的迭代

Addressables provides some key abstractions to the asset loading process that allow for faster iteration of content changes.

可寻址对象为资产加载过程提供了一些关键的抽象概念,从而可以更快地迭代内容更改。

  • Play Mode Simulation: assets load directly from disk without requiring a build process, while still providing the ability to debug asset reference counts through the profiler.

    播放模式模拟 :无需构建过程即可直接从磁盘加载资产,同时仍然可以通过事件探查器调试资产引用计数。

  • Fast Incremental Builds: Addressables ships with the new Scriptable Build Pipeline that improves the speed and reliability of incremental builds.

    快速增量构建 :Addressables附带了新的 可脚本构建管道 ,可提高增量构建的速度和可靠性。

  • Editor Hosting Services: A built-in facility for serving Addressable content to local, LAN connected devices provides a fast, convenient method for iterating content on device.

    Editor Hosting Services :用于将可寻址内容提供给局域网连接的本地设备的内置工具,提供了一种快速,方便的方法来迭代设备上的内容。

入门 (Getting Started )

Addressables separates the concerns of referencing and packaging of assets, enables faster iteration both in playmode and on deployed player builds, and provides automatic memory management and profiling tools. It is designed for extensibility and customization to solve for both simple and complex use cases. 

可寻址对象将引用和打包资产的关注点分开,在播放模式和已部署的播放器版本中实现更快的迭代,并提供自动内存管理和性能分析工具。 它设计用于可扩展性和自定义,以解决简单和复杂的用例。

While we are excited to finally bring Addressables out of preview so you can confidently use Addressables in your production apps today, we continue to work diligently on improvements in performance and functionality, and are looking ahead to ensure Addressables evolves along with Unity and with your needs as developers.

我们很高兴最终使Addressables脱离预览,以便您今天可以放心地在生产应用程序中使用Addressables,但我们将继续努力改进性能和功能,并期待确保Addressables与Unity一起发展并满足您的需求作为开发人员。

With many of the key technical challenges of supporting dynamic content solved by Addressables, the “last mile” problem still remains – the hosting and delivery of assets to live production games and apps. Later this year, we will be launching an enterprise ready, global content hosting solution, fully integrated into the Addressables system. If you would like to learn more about this service, sign up here.

在由Addressables解决的支持动态内容的许多关键技术挑战中,“最后一英里”问题仍然存在-将资产托管和交付给现场制作的游戏和应用程序。 今年晚些时候,我们将推出完全集成到Addressables系统中的企业就绪的全球内容托管解决方案。 如果您想了解有关此服务的更多信息,请在 此处 注册 。

Over 300 projects are already using Addressables. Add it in your project today using the Package Manager system in Unity. It’s easy to get started in a new project, or follow the Migration Guide if you would like to upgrade an existing project to take advantage of addressables. We also provide example projects for basic and advanced usage on GitHub.

已有300多个项目在使用可寻址对象。 立即使用 Unity中 的 Package Manager 系统 将其添加到您的项目 中。 开始 新项目 很容易, 如果您想升级现有项目以利用可寻址对象 ,则可以遵循《 迁移指南》 。 我们还在 GitHub上 提供了 用于基本和高级用法的 示例项目

If you’re currently using Addressables we want to hear from you via this short survey.

如果您当前使用的是“可寻址对象”,我们希望通过简短调查向您提供反馈。

-

[1] To clarify the meaning of “out of preview”, if you update to Addressables 1.1.5, you will note the “Preview” tag is gone from the package in Package Manager. This intermediate state communicates that the package passes a suite of automated tests against the latest version of Unity, and that the package owner – my team – is ready to support the feature in developer projects. It is compatible with all versions of Unity including and after 2018.3. For the future 2019.3 release, the intent is that the package will be “verified” – that is it will have been tested and validated by release QA in combination with the main Unity engine/editor release.

[1] 为了澄清“超出预览”的含义,如果您更新到Addressables 1.1.5,您会注意到“预览”标签已从“包管理器”中的包中删除。 这种中间状态表明,程序包通过了针对最新版本Unity的自动化测试套件,并且程序包所有者(我的团队)已准备好在开发人员项目中支持该功能。 它与Unity的所有版本兼容,包括2018.3。 对于未来的2019.3版本,其目的是要对该软件包进行“验证”-也就是说,它将通过QA版本与Unity主引擎/编辑器版本的结合进行测试和验证。

翻译自: https://blogs.unity3d.com/2019/07/15/addressable-asset-system/

可位寻址跟不可位寻址的区别