Unity_Addressable_Addressable Asset system with Cloud Content De
具有云内容交付的可寻址资产系统
You can use the Addressable asset system in conjunction with Unity Cloud Content Delivery (CCD) to distribute your remote Addressables content.
译:您可以将Addressable 资产系统与Unity Cloud Content Delivery (CCD)结合使用来分发您的远程 Addressables 内容。
Note: The purpose of this page is to describe how to link the concepts of Addressable Assets to CCD, and isn't meant to be an in-depth discussion of these ideas. Before you read this page, make sure you are familiar with both the Addressable system and Cloud Content Delivery.
译:注意:本页的目的是描述如何将可寻址资产的概念链接到 CCD,并不意味着对这些想法进行深入讨论。在阅读本页之前,请确保您熟悉 Addressable 系统和 Cloud Content Delivery。
To set up Addressable assets to work with CCD:
译:要设置可寻址资产以使用 CCD:
Configure a profile to include your CCD URL译:配置配置文件以包含您的 CCD URL
Build your AssetBundles, then upload them to CCD译:构建您的 AssetBundle,然后将它们上传到 CCD
See Getting Started for information about installing and implementing the Addressables package.
译:有关安装和实施 Addressables 包的信息,请参阅入门
See Upgrading to the Addressables System for information about integrating Addressables in an existing Unity Project.
译:有关在现有 Unity 项目中集成 Addressables 的信息,请参阅升级到 Addressables 系统。
See Remote content distribution for information on how to set up your Project so that you can host your Addressables content on a remote server.
译:有关如何设置项目的信息,以便您可以在远程服务器上托管 Addressables 内容,请参阅远程内容分发。
See Unity Cloud Content Delivery for more information about CCD.
译:有关 CCD 的更多信息,请参阅Unity 云内容交付。
Configure profile with CCD URL
TIP
The BuildPath
and LoadPath
variables stored in Profiles specify where the Addressables system creates your build artifacts and where it looks for your assets at runtime. Configure the remote paths to work with CCD. (Leave the local paths with their standard, default values, unless you have a specific reason to change them.)
译:Profiles中存储的和变量指定Addressables系统在何处创建您的构建工件以及BuildPath
在运行时在何处查找您的资产。配置远程路径以使用 CCD。(保留本地路径及其标准默认值,除非您有特定原因更改它们。)LoadPath
If necessary, create a new profile for publishing builds to CCD on the Profiles window. Configure the remote path variables in this profile to access your content at the correct URL.
译:如有必要,在“配置文件”窗口中创建一个新配置文件以将构建发布到 CCD 。在此配置文件中配置远程路径变量以通过正确的 URL 访问您的内容
You can set the remote BuildPath
to a convenient value. If you have multiple profiles, consider using a unique build path for each of them so that the build artifacts do not get mixed together, especially if you are hosting them from a different remote URL.
译:您可以将远程路径设置BuildPath
为方便的值。如果您有多个配置文件,请考虑为每个配置文件使用唯一的构建路径,这样构建工件就不会混合在一起,尤其是当您从不同的远程 URL 托管它们时
Set the remote LoadPath
to one of the following two paths:
译:将远程路径设置LoadPath
为以下两个路径之一:
If you publish content using a badge:译:如果您使用标记发布内容
If you publish using a release:译:如果您使用发行版发布
where:
(ProjectID)
is your CCD project's ID string译:(ProjectID)是您的 CCD 项目的 ID 字符串(EnvironmentName)
is the name of the Environment of your project译:(EnvironmentName)是你项目环境的名称(BucketID)
is the Bucket ID string for a CCD bucket within your project译:(BucketID)是项目中 CCD 存储桶的存储桶 ID 字符串(ReleaseID)
is the ID of a specific release within a bucket译:(ReleaseID)是存储桶中特定版本的 ID(BadgeName)
is the name of the specific CCD badge译:(BadgeName)是具体CCD标志的名称
See Profiles for information about how to create and edit profiles.
译:有关如何创建和编辑配置文件的信息,请参阅配置文件
IMPORTANT
You must perform a full rebuild your Addressables content when you change the remote load path.
译:当您更改远程加载路径时,您必须执行完全重建您的 Addressables 内容
Using the Cloud Content Delivery Bundle Location Option in a Profile
译:在配置文件中使用 Cloud Content Delivery Bundle 位置选项
If your project is set up to use the Unity Cloud Content Delivery service, you can set the profile's remote path pair to publish content to a designated bucket and badge.
译:如果您的项目设置为使用Unity Cloud Content Delivery服务,您可以设置配置文件的远程路径对以将内容发布到指定的存储桶和徽章
IMPORTANT
This feature requires the Content Delivery Management API package.
译:此功能需要 Content Delivery Management API 包
To set up a Profile variable to use the CCD bundle location:
译:要设置配置文件变量以使用 CCD 束位置
Open the Profile window (menu: Window > Asset Management > Addressables > Profiles).译:打开配置文件窗口(菜单:Window > Asset Management > Addressables > Profiles)
Select the profile to change.译:选择要更改的配置文件
Change the Remote variable to use the Cloud Content Delivery Bundle Location.译:更改Remote变量以使用Cloud Content Delivery Bundle Location

Choose
Automatic (set using CcdManager)
orSpecify the Environment, Bucket, and Badge
option译:选择Automatic (set using CcdManager)
或Specify the Environment, Bucket, and Badge
选项

Cloud Content Delivery Bundle Location Option 2 > [!Note] > The CcdManager is a static class that is used to notify Addressables which Environment, Bucket, and Badge to load from at Runtime. See CcdManager.译:Cloud Content Delivery Bundle Location Option 2 > [!Note] > CcdManager 是一个静态类,用于通知 Addressables 在运行时从哪个 Environment、Bucket 和 Badge 加载。请参阅CcdManager。
If choosing Automatic, select the environment you wish to use译:如果选择自动,请选择您希望使用的环境

If choosing to specify, select the environment you wish to use译:如果选择指定,请选择您希望使用的环境

云内容传递捆绑包位置自动环境选项
Choose the Bucket to use.译:选择要使用的桶

Cloud Content Delivery Bundle Location Bucket Option译:
NOTE
If no buckets are present, you will be shown this window before continuing.译:如果不存在存储桶,您将在继续之前看到此窗口

Choose the Badge.译:选择要使用的桶

Make this the active profile when building content for delivey with CCD.
译:在构建使用 CCD 交付的内容时,将其设为活动配置文件
See Profiles for information about how to modify profiles.
译:有关如何修改配置文件的信息,请参阅配置文件。
Configure groups with CCD URL
Configure groups to use Remote as their Build & Load Path in the inspector window.
译:配置组以在检查器窗口中使用Remote作为它们的构建和加载路径

See Groups for information about how to modify groups.译:有关如何修改组的信息,请参阅组
Build, upload and release Addressable content
Using to CCD Dashboard/CLI
构建、上传和发布可寻址内容
使用 CCD 仪表板/CLI
To generate and upload Addressable content to your CCD project:
译:要生成可寻址内容并将其上传到您的 CCD 项目
Set the profile you have set up for CCD as the active profile.译:将您为 CCD 设置的配置文件设置为活动配置文件
Build your Addressables content.译:构建您的可寻址内容
If you are making a full content build, see Building your Addressable content.译:如果您正在构建完整的内容,请参阅构建您的可寻址内容
If your are updating an existing build with modified remote content, see Building for content updates.译:如果您要使用修改后的远程内容更新现有构建,请参阅构建内容更新
Upload the files created at the remote build path using the CCD dashboard or command-line interface.译:使用CCD 仪表板或命令行界面上传在远程构建路径中创建的文件
Create a release and update the badge using the CCD dashboard or command-line interface.译:使用CCD 仪表板或命令行界面创建版本并更新标志
Building your Addressable content generates a content catalog (.json), a hash file (.hash), and one or more AssetBundle (.bundle) files. Upload these files to the bucket corresponding to the URL used in your profile load path.
译:构建可寻址内容会生成内容目录 (.json)、哈希文件 (.hash) 和一个或多个 AssetBundle (.bundle) 文件。将这些文件上传到与您的配置文件加载路径中使用的 URL 对应的存储桶
If you have made changes to local content, you must create a new Player build.
译:如果您对本地内容进行了更改,则必须创建一个新的 Player 版本
If you are using the Unity Cloud Build service, you can configure your cloud builds to send content to CCD. See Using Addressables in Unity Cloud Build for information.
译:如果您使用的是 Unity Cloud Build 服务,则可以配置您的云构建以将内容发送到 CCD。有关信息,请参阅在 Unity Cloud Build 中使用可寻址
Using CCD Management package
To generate, upload, and release Addressable content to your CCD project:
译:要生成、上传和发布可寻址内容到您的 CCD 项目
Open the Groups window (menu: Window > Asset Management > Addressables > Groups).译:打开组窗口(菜单:窗口 > 资产管理 > 可寻址 > 组)
Use the Build & Release option.译:使用构建和发布选项
The CCD Management package will use the default build script behavior to generate the Addressable bundles. Then, all groups associated with a path pair that is connected to a CCD bucket and badge via the drop-down window will have their generated bundles uploaded by the management package to those remote target. Finally, the management package will a create release for those remote target and update their badge.
译:CCD 管理包将使用默认构建脚本行为来生成可寻址包。然后,与通过下拉窗口连接到 CCD 存储桶和标识的路径对关联的所有组都将通过管理包将其生成的包上传到那些远程目标。最后,管理包将为那些远程目标创建发布并更新他们的标识

CCD Manager
When setting up the project profile path pairs and utilizing CCD, there is an option to use Automatic
. This option utilizes the CcdManager
to set static properties at Runtime to tell Addressables which Environment, Bucket, and Badge to reach out to for loading assets. The CcdManager
has 3 main properties: EnvironmentName
, BucketId
, and Badge
. Setting these properties at runtime before Addressables initializes will tell Addressables to look at these locations within CCD. To learn more about environments, buckets, and badges see CCD organization.
译:设置项目配置文件路径对并使用 CCD 时,可以选择使用Automatic
. 此选项利用CcdManager
在运行时设置静态属性来告诉 Addressables 访问哪个环境、桶和徽章以加载资产。有CcdManager
3 个主要属性:EnvironmentName
、BucketId
和Badge
。在 Addressables 初始化之前在运行时设置这些属性将告诉 Addressables 查看 CCD 中的这些位置。要了解有关环境、存储桶和徽章的更多信息,请参阅CCD 组织
Example Snippet of setting CcdManager Properties:
译:设置 CcdManager 属性的示例片段
NOTE
ANY Addressables call initializes the system so be sure to set the CcdManager
prior to any Addressables call to ensure that there are no race conditions or unexpected behaviors.
译:任何 Addressables 调用都会初始化系统,因此请务必在任何 Addressables 调用之前设置CcdManager
prior 以确保没有竞争条件或意外行为
Using Build Events
CCD provides a means of wrapping the build and upload service to provide additional functionality.
译:CCD 提供了一种包装构建和上传服务以提供附加功能的方法
Adding a build event
You can add additional events to PreUpdate and PreBuild event chains.
译:您可以将其他事件添加到 PreUpdate 和 PreBuild 事件链
Disabling version override warnings(禁用版本覆盖警告)
If you are getting warnings about overriding the player version and would like to keep your current setup, you can disable the warnings by removing the corresponding build events.
译:如果您收到有关覆盖播放器版本的警告并希望保留当前设置,您可以通过删除相应的构建事件来禁用警告