Version: 2017.3
版本控制系统
将 GitHub 用于 Unity Cloud Build

Using Git with Unity Cloud Build

Unity Cloud Build supports projects hosted in Git repositories (git-scm.com).

URL 语法

In order for Unity Cloud Build to connect to your repository, you need to provide the URL to your GIT server. This URL can be in one of several formats (the following are examples using GitHub or bitbucket):

  • https://github.com/youraccount/yourrepo

  • git://github.com/youraccount/yourrepo.git

  • git@bitbucket.org:youraccount/yourrepo.git

Use whichever format is most convenient for you; Unity Cloud Build automatically re-writes the URL into the format it needs.

Branches

When you configure your project in Unity Cloud Build, you need to specify which branch to build from. The default branch in most Git repositories is “master”, but you can configure a different branch for each build target.

Project subfolder

You also need to tell Unity Cloud Build which folder (or “directory”) in your project contains your Unity project; specifically the Assets and ProjectSettings folders. Depending on how you’ve arranged your project files, this might be the root folder in your repository. If it isn’t, then you need to provide Unity Cloud Build with the path to those folders. It looks something like: NewGameProject/Src/UnityProject/

Git submodules

If your project is using private Git submodules, make sure that the URLs present in your .gitmodules file are using the “git@” syntax instead of “https://” or “git://”.

例如:

  • git@github.com:youraccount/yourrepo.git(对于 GitHub)

  • git@bitbucket.org:youraccount/yourrepo.git(对于 Bitbucket)

Common Git hosts

Two common places to host your Git project’s Unity Cloud Build are:

版本控制系统
将 GitHub 用于 Unity Cloud Build
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961