facebook twitter hatena line email

Unity/CloudBuild

提供: 初心者エンジニアの簡易メモ
2021年7月31日 (土) 02:03時点におけるAdmin (トーク | 投稿記録)による版

移動: 案内検索

CloudBuildをOnへ

window/General/Services/CloudBuildをonへ

CloudBuildが使えるプランか確認

UnityTeasmAdvantedが必要なので、以下リンク先から確認

Unity/UnityTeams [ショートカット]

CloudBuild使えることを確認

  1. https://dashboard.unity3d.com/
  2. CloudBuild選択
  3. 連携してるUnityプロジェクト選択
  4. Configを開き
  5. "EDIT SOURCE CONTROL"のリンクが有効であることを確認

git連携

  1. https://dashboard.unity3d.com/
  2. CloudBuild選択
  3. 連携してるUnityプロジェクト選択
  4. Configを開き
  5. "EDIT SOURCE CONTROL"のリンクをクリック
  6. リポジトリ選択(githubとか選択してgitのプロジェクトを選択)

プラットフォーム選択

  1. Configを開き
  2. "SETUP NEW TARGET"ボタンを押して、プラットフォーム(WebGLとか)選択

Androidプラットフォームについて

  1. BundleIdを入力(com.example.~)
  2. keystoreのファイルをupload

iOSプラットフォームについて

  1. BundleIdを入力(com.example.~)
  2. プロビジョニング プロファイルをupload
  3. p12 ファイルをupload

CloudBuild実行

  1. historyからBuildボタンを押す

add a sceneエラーが出るとき

以下エラーがでるとき

There were no scenes configured to build! Please add a scene to the build using the Build Settings window of the Unity Editor.

Unityのメインメニュー/BuildSetting/SceneInBuildにAddOpenSceneを、クリックしてシーンを追加する

unavailableエラーがでるとき

loading logs; logs unavailable for this project & build.

暫く待つと治り、勝手にBuildが始まる。

WebGLプラットフォームについて

Asset Bundleビルド

  1. ConfigのAsset Bundle Optionsを選択
  2. "Yes, I'd like to build Asset Bundles"にチェックを入れ
  3. Bundles Base Pathにpathを入れる

Addressable Asset ビルド

Assets/AddressableAssetsData/WebGL/addressables_content_state.binにファイルが有るか確認。

  1. ConfigのAddressable Asset Optionsを選択
  2. "Yes, I'd like to build Addressable Assets"にチェックを入れる
  3. "Content Update Build"の項目にチェックを入れる。
  4. "Content State Location Method"に"use a content State file from Source Control"を選択
  5. Path to Content State Fileに"Assets/AddressableAssetsData/WebGL/addressables_content_state.bin"を入れる

BuildPlayerContentが見つからないエラーが出るとき

以下エラーがでるとき

Building Addressables: ERROR: Could not find BuildPlayerContent in Addressable Assets assembly.

Config/AddressablesBuildのチェックを外す

参考

https://www.fast-system.jp/unity-cloud-build-howto/