facebook twitter hatena line email

「Unity/CloudBuild」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(Addressable Asset ビルド)
(Addressable Asset ビルド)
行62: 行62:
 
# "Yes, I'd like to build Addressable Assets"にチェックを入れる
 
# "Yes, I'd like to build Addressable Assets"にチェックを入れる
 
# "Content Update Build"の項目にチェックを入れる。
 
# "Content Update Build"の項目にチェックを入れる。
# "Content State Location Method"に"use a content State file from Source Control"を選択
+
# "Content State Location Method"に"Use a content State file produced from another build target"
# Path to Content State Fileに"Assets/AddressableAssetsData/WebGL/addressables_content_state.bin"を入れる
+
# "Linked Build Target" を"Default WebGL"
 
+
 
+
  
 
2019/8ぐらいから CloudBuildにAddressablesが追加されたっぽい。
 
2019/8ぐらいから CloudBuildにAddressablesが追加されたっぽい。
行74: 行72:
 
以下エラーになった場合
 
以下エラーになった場合
 
  [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".
 
  [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".
 +
 +
# "Content State Location Method"に"Use a content State file from Source Control"を選択し
 +
# Path to Content State Fileに"Assets/AddressableAssetsData/WebGL/addressables_content_state.bin"を入れてるとなる。
 +
 +
以下のようにすると直るかも?
 +
# "Content State Location Method"に"Use a content State file produced from another build target"
 +
# "Linked Build Target" を"Default WebGL"へ
  
 
===BuildPlayerContentが見つからないエラーが出るとき===
 
===BuildPlayerContentが見つからないエラーが出るとき===

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

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"へ

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

以下エラーがでるとき

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

Config/AddressablesBuildのチェックを外す

参考

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