Addressable Assets are assets that have a unique address which you can use to load them from local or remote AssetBundles.
您必须执行以下操作,然后才能在 Cloud Build 中构建可寻址资源:
Unity 建议您先确保能够在本地使用可寻址资源,然后再使用 Cloud Build 构建这些资源。
如果要从全新的 Cloud Build 项目开始,需要先创建新的构建目标。
Use the Addressables section to configure properties that determine how the Addressables build process behaves. Each property is described in more detail with a tooltip.
要运行新的可寻址资源构建,请执行以下操作:
If you want to upload Addressables to the Cloud Content Delivery (CCD) service from Cloud Build:
See Addressable Asset system with Cloud Content Delivery for more information about using Addressables with CCD.
内容更新构建使用新的可寻址内容来更新以前构建的播放器。
要更新现有播放器,更新构建需要一个内容状态文件。这会将更新构建的内容链接到现有播放器。进行新的可寻址资源构建时,会生成内容状态文件。
要使用新的可寻址资源来更新以前构建的播放器,请执行以下操作:
配置构建目标后,要启动新的可寻址资源构建,请执行以下操作:
成功完成新构建后,此构建的 More 菜单 (⋮) 可显示 Download Addressable Assets 选项。
完成可寻址资源构建后,可以将可寻址资源内容从 Cloud Build 复制到托管服务提供商。可以手动或者使用构建后脚本来执行此操作。
完成可寻址资源构建后,从 More 菜单 (⋮) 中选择 Download Addressables Assets。下载内容后,您可以像在本地进行构建一样,将内容上传到托管服务提供商。
Cloud Build 支持在构建之前或之后运行自定义 shell 脚本。您可以创建构建后脚本,从而在构建成功完成后自动上传您的可寻址资源内容。
要启用构建后脚本,请执行以下操作:
在编写脚本时,以下提示可能很有用:
构建的可寻址资源内容位于 $WORKSPACE/.build/last/<BUILD_TARGET_ID>/extra_data/addrs/
You can set environment variables for secret keys in the Build Target Configurations page.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.