Addressable Asset System
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  and will be available as a verified package for Unity 2019.3. It will remain fully supported in Unity 2018 LTS releases.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
 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.
38 КомментарииПодписаться на комментарии