Unity_Addressables_
The Addressables system provides tools and scripts to organize and package content for your application and an API to load and release assets at runtime.
译:Addressables系统提供了用于组织和打包应用程序内容的工具和脚本,以及用于在运行时加载和释放资产的API。
When you make an asset "Addressable," you can use that asset's address to load it from anywhere. Whether that asset resides in the local application or on a content delivery network, the Addressable system locates and returns it.
译:当您使资产为“可寻址的”时,您可以使用该资产的地址从任何地方加载它。无论该资产驻留在本地应用程序中还是在内容交付网络中,Addressable系统都会定位并返回它。
Adopt the Addressables system to help improve your project in the following areas:
译:采用Addressables系统可以帮助您在以下方面改进项目:
Flexibility: Addressables give you the flexibility to adjust where you host your assets. You can install assets with your application or download them on demand. You can change where you access a specific asset at any stage in your project without rewriting any game code.
译:灵活性:可寻址使您可以灵活地调整托管资产的位置。您可以在应用程序中安装资产,也可以按需下载资产。你可以在项目的任何阶段改变访问特定资产的位置,而无需重写任何游戏代码。
Dependency management: The system automatically loads all dependencies of any assets you load, so that all meshes, shaders, animations, and other assets load before the system returns the content to you.
译:依赖关系管理:系统会自动加载你加载的任何资产的所有依赖关系,这样所有的网格、着色器、动画和其他资产都会在系统返回内容给你之前加载
Memory management: The system unloads assets as well as loads them, counting references automatically and providing a robust profiler to help you spot potential memory problems.
译:内存管理:系统卸载资产以及加载它们,自动计数引用,并提供一个健壮的分析器,以帮助您发现潜在的内存问题。
Content packing: Because the system maps and understands complex dependency chains, it package AssetBundles efficiently, even when you move or rename assets. You can prepare assets for both local and remote deployment, to support downloadable content and reduced application size.
译:内容打包:因为系统映射并理解复杂的依赖关系链,所以即使在移动或重命名资产时,它也能有效地打包AssetBundles。您可以为本地和远程部署准备资产,以支持可下载的内容和减小的应用程序大小。
For an introduction to the Addressables system see Simplify your content management with Addressables.
译:有关Addressables系统的介绍,请参见使用Addressables简化内容管理。
NOTE
The Addressables system builds upon Unity AssetBundles. If you want to use AssetBundles in your projects without writing your own detailed management code, you should use Addressables.
译:Addressables系统构建在Unity AssetBundles上。如果你想在你的项目中使用AssetBundles而不需要自己编写详细的管理代码,你应该使用Addressables。
Adding Addressables to an existing Project
You can adopt Addressables in an existing Unity Project by installing the Addressables package. To do this, you need to assign addresses to your assets and refactor any runtime loading code. See Upgrading to the Addressables system for more information.
译:你可以通过安装Addressables包在现有的Unity项目中采用Addressables。为此,您需要为资产分配地址并重构任何运行时加载代码。有关更多信息,请参见升级到Addressables系统。
Although you can integrate Addressables at any stage in a project’s development, Unity recommends that you start using Addressables immediately in new projects to avoid unnecessary code refactoring and content planning changes later in development.
译:虽然你可以在项目开发的任何阶段集成Addressables,但Unity建议你在新项目中立即开始使用Addressables,以避免在开发后期进行不必要的代码重构和内容计划更改。