Unity Cloud Build 支持存储在 Mercurial 代码仓库中的项目。您可以将代码仓库托管在 Bitbucket 或私有服务器上。
要连接到代码仓库(Repository),Unity Cloud Build 需要您提供相应的访问凭据。这一要求适用于 Bitbucket 或其他地方托管的 Mercurial 代码仓库。
在 Services 窗口中的 Cloud Build 旁边,单击 OFF 按钮以将其切换为 ON 状态:
在 CLOUD BUILD 窗口中,单击 Cloud Build 开关为项目启用 Cloud Build。
在 SOURCE CONTROL 服务窗口中:
1.从 SOURCE CONTROL HOST TYPE 下拉菜单中,选择 Mercurial。
2.在 SOURCE CONTROL HOSTING URL 字段中,输入 Mercurial 代码仓库的 URL。有关 URL 格式的信息,请参阅以下的 URL 语法部分。
3.单击 Next 按钮。
要连接到代码仓库,必须指定 Mercurial 服务器的 URL。您可以指定 URL 使用以下协议:
HTTPS
SSH
以下是 bitbucket 的 URL 示例:
https://github.com/youraccount/yourrepo
git@bitbucket.org:youraccount/yourrepo.git
请使用最适合您的格式。Unity Cloud Build 会自动将 URL 重写为所需的格式。
在 Mercurial 服务器上,为 Unity Cloud Build 创建用户名并分配安全密码。如果 Mercurial 主机支持只读的用户帐户,请将此帐户设置为只读。
在 GRANT ACCESS 窗口中,输入用户名和密码。
要在 Unity Editor 中为应用程序配置运行时平台,请转到 Services 窗口并进行以下更改:
1.从 TARGET LABEL 下拉菜单中,选择构建平台。
2.从 BRANCH 下拉菜单中,选择用于构建项目的分支。大多数 Git 代码仓库中的默认分支为“master”。如果要为多个构建目标进行构建,则可为每个构建目标配置不同的分支。
3.在 PROJECT SUBFOLDER 字段中,输入项目中包含 Unity 项目的文件夹;特别是 Assets 和 ProjectSettings 文件夹。该文件夹的路径通常类似于 NewGameProject/Src/UnityProject/
**注意**:如果您的 Unity 项目不在代码仓库的根目录中,则必须填写 __PROJECT SUBFOLDER__ 字段。
(可选)如果不希望 Cloud Build 在您对项目进行更改时自动构建项目,请取消选中 AUTO-BUILD 复选框。有关更多信息,请参阅 Automated Build Generation。
2018–04–10 页面已发布
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.