欢迎光临散文网 会员登陆 & 注册

Unity_Addressable_配置Addressable

2023-03-29 09:09 作者:unity_某某师_高锦锦  | 我要投稿

The following topics provide an overview of the configuration options for setting up the Addressables system in a project and links to more detailed information:

译:以下主题概述了在项目中设置Addressables系统的配置选项,并链接到更详细的信息:

  • Initialization译:初始化

  • System settings译:系统设置

  • Group settings译:组设置

  • Profiles译:配置文件

  • Asset hosting service译:资源托管服务

  • Preferences译:预设

  • Additional topics译:额外提示

Initialization

The Addressables system uses a set of ScriptableObject assets to store your configuration settings. The system stores these settings assets in the Assets/AddressableAssetsData folder of your Unity project. It creates this folder and default settings objects when you initialize Addressables from the Groups window. Open the Groups window (menu: Window > Asset Management > Addressables > Groups) after installing the Addressables package.

译:Addressables系统使用一组ScriptableObject资产来存储您的配置设置。系统将这些设置资产存储在Unity项目的assets /AddressableAssetsData文件夹中。当您从“组”窗口初始化Addressables时,它会创建此文件夹和默认设置对象。安装完Addressables包后,打开“Groups”窗口(菜单:window > Asset Management > Addressables > Groups)。

The first time you open the Groups window, click Create Addressables Settings to run the initialization command to create the settings folder and assets:

译:第一次打开“Groups”窗口时,单击“Create Addressables Settings”,运行初始化命令创建设置文件夹和资产:


Before initializing the Addressables system in a Project

Add the AddressableAssetsData folder and its contents to your source control system.

译:

在初始化项目中的Addressables系统之前将AddressableAssetsData文件夹及其内容添加到源代码控制系统中。

See Getting started for a quick guide to using the Addressable system and Managing Addressables in the Editor for information on ways to organize your Addressable assets.

译:关于如何组织你的Addressable ,请参阅入门以获得使用可寻址系统和在编辑器中管理可寻址的快速指南。

System settings

The AddressableAssetsSettings object contains the global, system settings for your Project. You can access these settings from the menu: Window > Asset Management > Addressables > Settings or from the Tools menu on the Groups window.

译:AddressableAssetsSettings对象包含项目的全局系统设置。您可以从菜单中访问这些设置:Window > Asset Management > Addressables > Settings或从“Tools “工具”菜单中。

See Addressable system settings for information about each setting.

译:有关每种设置的信息,请参阅可寻址系统设置。

Group settings

The Addressables system uses the Groups you define to determine how to package your Addressable assets into local and remote AsssetBundles. Each group has its own settings object that you can use to control that group's options. Addressables creates a new settings object whenever you create a group.

译:Addressables系统使用您定义的组来确定如何将您的Addressable资产打包到本地和远程的AsssetBundles中。每个组都有自己的设置对象,可以用来控制该组的选项。Addressables在创建组时会创建一个新的设置对象。

See Groups and Group settings for more information.

译:有关详细信息,请参阅组和组设置。

Profiles

Profiles let you configure sets of build variables as appropriate for the purpose of build. For example, you could configure a profile to use for development builds of your project, one for test builds, and another for publishing release builds. You can create as many profiles as you need.

译:配置文件允许您根据构建的目的适当配置一组构建变量。例如,您可以配置一个概要文件用于项目的开发构建,一个用于测试构建,另一个用于发布发布构建。您可以根据需要创建任意数量的概要文件。

See Profiles for more information.

译:有关更多信息,请参阅概要文件。

Asset hosting service

The Addressables system provides a asset hosting service that runs within the Unity Editor. You can use this service to test your remote content via an HTTP connection.

译:Addressables系统提供了在Unity Editor中运行的资产托管服务。您可以使用此服务通过HTTP连接测试远程内容。

See Asset hosting service for more information.

译:有关更多信息,请参阅资产托管服务。


Unity Preferences

The Addressables package adds its own section to the Unity Editor Preferences window. The Addressables preferences include:

译:Addressables包将自己的部分添加到Unity Editor Preferences窗口。Addressables首选项包括:

Debug Build Layout

When enabled, the build system produces the Build layout report. This option is disabled by default since it increases the time need to create a build. The build report contains a detailed description of each AssetBundle produced by the build.

译:启用后,生成系统将生成生成布局报告。默认情况下禁用此选项,因为它会增加创建构建所需的时间。构建报告包含构建生成的每个AssetBundle的详细描述。

See Diagnostic tools for a description of this and other analysis tools.

译:有关此工具和其他分析工具的描述,请参见诊断工具。

Build Addressables on Player Build (Unity 2021.2+)

Determines whether Unity builds Addressables content as part of your Player build.

Building Addressables content together with the Player can be convenient, but does increase build time, especially on large projects, since this rebuilds the Addressables content even when you haven't modified any assets. If you don't change your Addressables content between most builds, consider disabling this option.

译:

决定Unity是否将可寻址内容构建为播放器构建的一部分。与播放器一起构建可寻址内容可能很方便,但确实会增加构建时间,特别是在大型项目中,因为即使你没有修改任何资产,这也会重建可寻址内容。如果在大多数构建之间不更改Addressables内容,请考虑禁用此选项。

The options include:

译:选项包括:

  • Build Addressables content on Player Build: Always build Addressables content when building the Player.译:Build Addressables content on Player Build:在构建播放器时总是构建可寻址内容

  • Do not Build Addressables content on Player Build: Never build Addressables content when building the Player. (If you modify Addressables content, you must rebuild it manually before building the Player.)译:在构建播放器时,永远不构建可寻址内容。(如果你修改Addressables内容,你必须在构建播放器之前手动重建它。)

  • Use global Settings (stored in preferences): Use the value specified in the Unity Editor Preferences (under Addressables). This option allows every project contributor to set the option as they choose.译:Use global Settings (stored in preferences)使用Unity Editor Preferences中指定的值(在Addressables下)。该选项允许每个项目贡献者按照自己的选择设置该选项。

The first two options override the global Preference for the current Project and affect all contributors who build the Project. Otherwise, the global Preference applies to all Unity projects.

译:前两个选项覆盖当前项目的全局首选项,并影响构建项目的所有贡献者。否则,全局首选项将应用于所有Unity项目。

See Building Addressables content with Player builds for more information.

译:有关更多信息,请参阅与播放器构建可寻址内容。

Additional topics

See the following topics on more involved setup options:

译:有关更多的设置选项,请参阅以下主题:

  • Continuous integration

  • Build scripting

  • Customizing Addressables runtime initialization


Unity_Addressable_配置Addressable的评论 (共 条)

分享到微博请遵守国家法律