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

Unity_Addressable_Addressable资源设置

2023-03-30 15:31 作者:unity_某某师_高锦锦  | 我要投稿

You can access the main Addressable system option on the Addressable Asset Settings Inspector (menu: Window > Asset Management > Addressables > Settings).

译:通过Window > Asset Management > Addressables > Settings可以访问Addressable资源

The Addressables system stores the settings asset in the AddressableSettingsData folder (under your Project Assets folder). If this folder doesn't exist yet, you must initialize the Addressables system from the Groups window (menu: Window > Asset Management > Addressables > Groups).

译:Addressables系统将设置资产存储在AddressableSettingsData文件夹中(在您的项目资产文件夹下)。如果此文件夹还不存在,则必须从Groups窗口(菜单:window > Asset Management > Addressables > Groups)初始化Addressables系统。

The Addressable Asset Settings Inspector(属性面板)


The Inspector contains the following sections:

译:

  • Profile 译:配置文件

  • Diagnostics译:诊断功能

  • Catalog译:目录

  • Content Update译:内容更新

  • Downloads译:下载

  • Build译:构建

  • Build and Play Mode Scripts译:构建和播放模式脚本

  • Asset Group Templates译:临时资源组

  • Initialization object list译:初始化物体列表

You can click the Manage Groups button to open the Groups window.

译:通过Manage Groups 打开组编辑窗口

Profile

Profile settings

Use the Profile in Use list to choose the active profile. The active profile determines the value of variables used by the Addressables build scripts.

译:使用“使用中的配置文件”列表选择活动的配置文件。活动概要文件确定Addressables构建脚本使用的变量的值。

Click the Manage Profiles button to open the Profiles window where you can create new profiles and change profile variables.

译:点击Manage Profiles按钮以打开Profiles窗口,您可以在其中创建新的概要文件并更改概要文件变量。

See Profiles for more information about profiles.

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

Diagnostics

Diagnostics settings

Property                            Function

Send Profiler Events:Enables profiler events. You must enable this setting to use the Addressables Event Viewer window.译:启用分析器事件。必须启用此设置才能使用“可寻址事件查看器”窗口。

Log Runtime Exceptions:Logs runtime exceptions for asset loading operations (in addition to recording the error to the AsyncOperationHandle.OperationException property).译:记录资产加载操作的运行时异常(除了将错误记录到AsyncOperationHandle之外。OperationException属性)。

Enable all logging

By default, Addressable Assets only logs warnings and errors. You can enable detailed logging by opening the Player settings window (menu: Edit > Project Settings... > Player), navigating to the Other Settings > Configuration section, and adding "ADDRESSABLES_LOG_ALL" to the Scripting Define Symbols field.

译:默认情况下,可寻址资产只记录警告和错误。您可以通过打开播放器设置窗口(菜单:Edit > Project Settings... > Player),导航到Other Settings > Configuration,并将“ADDRESSABLES_LOG_ALL”添加到Scripting Define Symbols字段。

Catalog

Catalog settings

Settings related to the Addressables Catalog, which maps the address of an asset to its physical location.

译:与Addressables Catalog相关的设置,它将资产的地址映射到其物理位置。

Property                                Function

Player Version OverrideOverrides the timestamp used to formulate the remote catalog name. If set, the remote catalog is named, Catalog_<Player Version Override>.json. If left blank, then the timestamp is used. Note that when you use a unique remote catalog name for every new build, you can host multiple versions of your content at the same base URL. If you use the same override string for every build, then all players will load the new catalog. Note also that player update builds always use the same remote catalog name as the build they are updating (see Content update builds).译:Player Version Override重写用于制定远程编目名称的时间戳。如果设置,远程目录命名为Catalog_<Player Version Override>.json。如果为空,则使用时间戳。请注意,当您为每个新构建使用唯一的远程目录名称时,您可以在相同的基本URL上托管内容的多个版本。如果你对每个构建使用相同的覆盖字符串,那么所有玩家都将加载新的目录。还要注意,播放器更新构建总是使用与它们正在更新的构建相同的远程目录名称(参见内容更新构建)。

Compress Local CatalogBuilds the catalog in a compressed AssetBundle file.
Reduces the storage size of the catalog, but increases the time to build and to load the catalog.Optimize Catalog SizeReduces the size of the catalog by creating a lookup table for internal IDs. Can increase the time required to load the catalog.译:Compress Local Catalog:在压缩的AssetBundle文件中构建目录。减少了目录的存储大小,但增加了构建和加载目录的时间。优化目录大小通过为内部id创建一个查找表来减小目录的大小。可以增加加载目录所需的时间。

Content Update

Content update settings

Settings that control remote content builds and updates.译:控制远程内容构建和更新的设置。

Property                                              Function

Only update catalogs manually Disables the automatic check for an updated remote catalog when the Addressables system initializes at runtime. You can manually check for an updated catalog.译:Only update catalogs manually:当Addressables系统在运行时初始化时,禁用对已更新的远程编目的自动检查。您可以手动检查更新的目录。

Content State Build Path Where to build the content state file produced by the default build script.译:Content State Build Path :在哪里构建由默认构建脚本生成的内容状态文件。

Build Remote Catalog Enable to build a remote catalog.译:Build Remote Catalog :启用以构建远程编目

Build & Load Paths Where to build and load the remote catalog. Choose a Profile path pair from the list or select <custom> if you want to set the build and load paths separately.
Only visible when you enable Build Remote Catalog.译:Build & Load Paths

在哪里构建和加载远程编目。从列表中选择概要文件路径对,如果要分别设置构建和加载路径,则选择<custom>。仅在启用生成远程编目时可见。

Build PathWhere to build the remote catalog. Typically, you should use the RemoteBuildPath Profile variable.

Only shown if you set Build & Load Paths to <custom>.译:Build Path在哪里构建远程编目。通常,您应该使用RemoteBuildPath概要文件变量。只有当你设置构建和加载路径为<custom>时才会显示。

Load PathThe URL at which to access the remote catalog. Typically, you should use the RemoteLoadPath Profile variable.
Only shown if you set Build & Load Paths to <custom>.译:Load Path:

访问远程编目的URL。通常,您应该使用remotelloadpath概要文件变量。仅当您将构建和加载路径设置为时显示为<custom>


Downloads

Download settings

Settings that affect catalog and AssetBundle download handling.

译:影响目录和AssetBundle下载处理的设置。

Property                                                  Function

Custom certificate handlerThe class to use for custom certificate handling. The list contains all classes in the project that extend UnityEngine.Networking.CertificateHandler.译:Custom certificate handler:用于自定义证书处理的类。该列表包含了项目中扩展unityengine . network . certificatehandler的所有类。

Max Concurrent Web Requests:The system queues any requests beyond this limit. 2-4 concurrent downloads are recommended to reach optimum download speeds.译:Max Concurrent Web Requests:统将对超出此限制的任何请求进行排队。建议同时下载2-4次以达到最佳下载速度。

Catalog Download Timeout How many seconds to wait for a catalog file to download.译:Catalog Download Timeout :目录文件下载需要等待多少秒

Build

Build settings

Settings that affect all builds.译:影响所有构建的设置。

Property                                                            Function

Build Addressables on Player Build Whether Unity builds Addressables content as part of your Player build. 译:Build Addressables on Player Build :Unity是否将可寻址内容构建为播放器构建的一部分

• 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.)译:Do not Build Addressables content on Player Build在构建播放器时,永远不要构建可寻址内容。(如果你修改Addressables内容,你必须在构建播放器之前手动重建它。)

• Use global Settings (stored in preferences): Use the value specified in the Unity Editor Preferences (under Addressables).译: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, Preferences value applies to all Unity projects. See Building content for more information.译:

Ignore Invalid/Unsupported Files in BuildIf enabled, the Addressables build script excludes invalid or unsupported files rather than aborting the build.译:前两个选项覆盖当前项目的全局首选项,并影响构建项目的所有贡献者。否则,全局的,Preferences值将应用于所有Unity项目。有关更多信息,请参阅构建内容

Unique Bundle IDsWhether to produce a unique name for a bundle in every build. See Unique Bundle IDs for more information.译:是否在每次构建中为包生成唯一的名称。有关更多信息,请参阅唯一Bundle id。

Contiguous BundlesProduces a more efficient bundle layout. If you have bundles produced by Addressables 1.12.1 or earlier, disable this option to minimize bundle changes.译:生成更有效的包布局。如果您有Addressables 1.12.1或更早版本生成的包,请禁用此选项以最小化包的更改。

Non-Recursive Dependency CalculationEnable this option to improve build times and reduce runtime memory overhead when assets have circular dependencies. Examples:
• A prefab assigned to Bundle A references a material assigned to Bundle B. If this option is disabled, Unity needs to calculate the material's dependencies twice, once for each bundle. If this option is enabled, Unity only needs to calculate the material's dependencies once, for Bundle B.译:当资产具有循环依赖关系时,启用此选项可改善构建时间并减少运行时内存开销。例子:

•分配给Bundle A的预设物会引用分配给Bundle b的材质。如果该选项被禁用,Unity需要计算材料的依赖关系两次,每个Bundle一次。如果这个选项被启用,Unity只需要计算一次材料的依赖关系,对于Bundle B

• Many scenes reference the same material. If this option is disabled, Unity opens each scene to calculate shader usage, which is a costly operation. If this option is enabled, Unity only loads the material and doesn't need to open any scenes for dependency calculation.译:许多场景引用了相同的材质。如果这个选项被禁用,Unity会打开每个场景来计算着色器的使用情况,这是一个昂贵的操作。如果启用这个选项,Unity只加载素材,不需要打开任何场景进行依赖计算。

This option is enabled by default when using Unity version 2021.2 or later. Disabling this option invalidates previously built bundles because the rebuilt bundles will have a different build layout. Therefore this option should remain enabled unless builds have been shipped.
译:当使用Unity 2021.2或更高版本时,默认启用此选项。禁用此选项将使以前构建的包失效,因为重新构建的包将具有不同的构建布局。因此,除非已经发布构建,否则该选项应该保持启用状态。

Some circular dependencies can fail to load when the option is enabled because the referenced asset is always assigned to the same bundle location, even when more content is added to the build. This issue often occurs for Monoscripts. Building the MonoScript bundle (see MonoScript Bundle Naming Prefix) can help resolve these load failures.译:当启用该选项时,一些循环依赖项可能无法加载,因为所引用的资产总是分配给相同的包位置,即使在向构建中添加更多内容时也是如此。这个问题经常发生在Monoscripts中。构建MonoScript bundle(参见MonoScript bundle Naming Prefix)可以帮助解决这些加载失败。

Shader Bundle Naming PrefixHow to name the bundle produced for Unity shaders.译:如何为Unity着色器生成的包命名。

MonoScript Bundle Naming PrefixHow to name the bundle containing all MonoScripts. The bundle ensures that Unity loads all Monoscripts before any MonoBehaviors can reference them. It also decreases the number of duplicated or complex Monoscript dependencies and so, reduces runtime memory overhead.译:MonoScript包命名前缀如何命名包含所有MonoScript的包。该bundle确保Unity在monobehaviour引用monoscript之前加载所有monoscript。它还减少了重复或复杂的Monoscript依赖的数量,从而减少了运行时内存开销。

Strip Unity Version From AssetBundlesWhether to remove the Unity version from the bundle header.译:Strip Unity Version From assetbundles是否从bundle头中移除Unity版本。

Disable Visible Sub Asset RepresentationsEnable this option to improve build times if you do not use subobjects directly (Sprites, sub-meshes, etc).译:如果你不直接使用子对象(Sprites,sub-meshes等),启用这个选项可以提高构建时间。

Build and Play Mode Scripts

Configured build and Play mode scripts

Configures the IDataBuilder scripts available in the project. If you create a custom Build or Play Mode script, you must add it to this list before you can use it.

译:配置项目中可用的IDataBuilder 脚本。如果创建自定义生成或播放模式脚本,则必须将其添加到此列表中,才能使用它。

The Addressables packages contains a few build scripts that handle the default build processes and provide different ways to access your data in Play mode. You can find these scripts in the AddressableAssetData/DataBuilders folder.

译:Addressables包包含一些构建脚本,用于处理默认的构建过程,并提供在运行模式下访问数据的不同方法。你可以在AddressableAssetData/DataBuilders文件夹中找到这些脚本。

NOTE

Build and Play Mode scripts are ScriptableObject assets. Follow the instructions in the ScriptableObject manual page to create a ScriptableObject asset for a Build or Play Mode script.

译:构建和运行模式脚本是ScriptableObject资产。按照ScriptableObject手册页中的说明为构建或播放模式脚本创建ScriptableObject资产。

To add a custom script, click on the + button and select the ScriptableObject asset which represents the desired script from the file panel.

译:要添加自定义脚本,单击+按钮并从文件面板中选择ScriptableObject资产,该资产表示所需的脚本。

See Custom Build Scripting for more information about custom scripts.

译:有关自定义脚本的更多信息,请参见自定义生成脚本。

Asset Group Templates

Configured group templates

Defines the list of templates that you can use to create new groups. When you create a new template, you must add it to this list before you can use it.

译:定义可用于创建新组的模板列表。创建新模板时,必须将其添加到此列表中,才能使用它。

The Addressables package contains one template that includes the schemas used by the default build scripts. You can find the template in the AddressableAssetData/AssetGroupTemplates folder.

译:Addressables包包含一个模板,该模板包含默认构建脚本使用的模式。您可以在AddressableAssetData/AssetGroupTemplates文件夹中找到该模板。

NOTE

Group templates are ScriptableObject assets. Follow the instructions in the ScriptableObject manual page to create a ScriptableObject asset for a group template.

译:组模板是ScriptableObject资产。按照ScriptableObject手册页中的说明为组模板创建ScriptableObject资产。

To add a custom template, click on the + button and select the ScriptableObject asset which represents the desired template from the file panel.

译:要添加自定义模板,单击+按钮并从文件面板中选择表示所需模板的ScriptableObject资产。

See Group templates for information on creating custom templates.

译:有关创建自定义模板的信息,请参见组模板。

Initialization object list

Configured InitializationObjects

Configures the initialization objects for the project. Initialization objects are ScriptableObject classes that implement the IObjectInitializationDataProvider interface. You can create these objects to pass data to the Addressables initialization process at runtime.

译:为项目配置初始化对象。初始化对象是ScriptableObject类,它实现了IObjectInitializationDataProvider接口。您可以创建这些对象,以便在运行时将数据传递给Addressables初始化过程。

NOTE

Initialization objects are ScriptableObject assets. Follow the instructions in the ScriptableObject manual page to create a ScriptableObject asset for a initialization object.

译:初始化对象是ScriptableObject资产。按照ScriptableObject手册页中的说明为初始化对象创建ScriptableObject资产。

To add an initialization object, click on the + button and select the ScriptableObject asset which represents the desired object from the file panel.

译:要添加初始化对象,单击+按钮并从文件面板中选择表示所需对象的ScriptableObject资产。


Unity_Addressable_Addressable资源设置的评论 (共 条)

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