Unity Cloud Build 支持存储在 Mercurial 代码仓库中的项目。您可以将代码仓库托管在 Bitbucket 或私有服务器上。
要连接到代码仓库(Repository),Unity Cloud Build 需要您提供相应的访问凭据。这一要求适用于 Bitbucket 或其他地方托管的 Mercurial 代码仓库。
1.登录 Unity 开发者控制面板 (Developer Dashboard)。 2.从 Projects 页面中,选择您的项目。 3.在左侧导航面板中,单击 Cloud Build > Config。 4.如果这是第一次配置 Cloud Build,您会看到 Build History 页面上显示 Cloud Build has not been set up for this project。单击 Set up Cloud Build 链接继续。 5.在 Source Control 窗口中,单击 Manual 选项卡。 6.在 SCM URL 字段中,输入 Mercurial 服务器的 URL。有关 URL 格式的信息,请参阅以下的 URL 语法部分。 7.从 SCM Type 下拉菜单中,选择 Mercurial。 7.单击 Next Access 按钮。
要连接到代码仓库,必须指定 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 us access to your source control 窗口上,输入用户名和密码,然后单击 Next: Target Setup。
在 Target Setup 窗口中,选择编译平台。
在开发者控制面板 (Developer Dashboard) 上的 NEW BUILD TARGET: BASIC INFO 窗口中:
1.在 Target Label 字段中,输入编译名称。
2.如果代码仓库的根文件夹未包含您的资源和项目设置,请在 Project Subfolder 字段中输入包含所需资源和项目设置的文件夹的 URL。
3.从 Unity Version 下拉菜单中,选择用于编译项目的 Unity 版本。
4.如果不希望每次更新代码仓库时便自动编译项目,请单击 Auto-build 切换开关以禁用此功能。
如果要针对 iOS 或 Android 平台进行编译,则下一步是输入编译的凭据。单击 Next: Credentials。对于所有其他平台,请单击 Next: Build 以完成配置并开始初始编译。
在 IOS SIGNING CREDS 窗口上,提供以下信息:
__Bundle ID__,用于在设备上和 Google Play 商店中唯一标识您的应用程序。
输入您的 Android 密钥库凭据或选择 Auto Generated Debug Keystore 来使用开发密钥库。有关 Android 密钥库的更多信息,请参阅 Android 密钥库系统 (Android Keystore System)。
在 IOS SIGNING CREDS 窗口上,提供以下信息:
Bundle ID,用于在设备上唯一标识您的应用程序。
用于编译应用程序的 Xcode 版本。
输入您的 IOS 凭据。有关 iOS 凭据的更多信息,请参阅发布到 iOS。
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.