facebook twitter hatena line email

「Unity/CloudBuild」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(Addressables: Could not find a part of the path"エラーの場合)
(default-webglが無いと出るとき)
行85: 行85:
  
 
ProfileにDefault以外が選択されてないか確認して、Default以外が選択されていれば、それを、CloudBuildのAddressableAssetOptionsのProfile Nameに入れる。
 
ProfileにDefault以外が選択されてないか確認して、Default以外が選択されていれば、それを、CloudBuildのAddressableAssetOptionsのProfile Nameに入れる。
 +
 +
ProfileNameを入れても、同じエラーになった・・・(原因不明)
  
 
===BuildPlayerContentが見つからないエラーが出るとき===
 
===BuildPlayerContentが見つからないエラーが出るとき===

2021年7月31日 (土) 05:51時点における版

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 produced from another build target"
  5. "Linked Build Target" を"Default WebGL"へ

2019/8ぐらいから CloudBuildにAddressablesが追加されたっぽい。

参考:https://qiita.com/yakimeron/items/821e101307e69c8eddaf

Addressables: Could not find a part of the path"エラーの場合

以下エラーになった場合

[Unity] Error Building Addressables: Could not find a part of the path "/BUILD_PATH/new-unity-project-1.default-webgl/Assets/AddressableAssetsData/WebGL/addressables_content_state.bin".
  1. "Content State Location Method"に"Use a content State file from Source Control"を選択し
  2. Path to Content State Fileに"Assets/AddressableAssetsData/WebGL/addressables_content_state.bin"を入れてるとなる。

以下のようにすると直るかも?

  1. "Content State Location Method"に"Use a content State file produced from another build target"
  2. "Linked Build Target" を"Default WebGL"へ

default-webglが無いと出るとき

以下エラーになった場合

1: Error: Could not find Content State File for Linked Build Target "default-webgl". Please ensure at least one addressables build has completed successfully for that target.

ProfileにDefault以外が選択されてないか確認して、Default以外が選択されていれば、それを、CloudBuildのAddressableAssetOptionsのProfile Nameに入れる。

ProfileNameを入れても、同じエラーになった・・・(原因不明)

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

以下エラーがでるとき

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

Config/AddressablesBuildのチェックを外す

参考

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