コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

2021-06-01から1ヶ月間の記事一覧

【Jenkins】io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 500 Internal Server Error:

概要 io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 500 Internal Server Error: {"error":{"code":500,"message":"Unable to load one or more of the requested types. Retrieve the LoaderExceptions pro…

【Bitmap font generator】X characters from the file are not available in the font

概要 Bitmap font generator メニューの「Edit > Select chars from file」で テキストファイルから文字を読み込んだ時に X characters from the file are not available in the font 上記の警告が表示されて文字が反映されなかった場合は テキストファイル…

【Jenkins】currentBuild.description で改行する方法

概要 stage( "【ステージ名】" ){ steps { script{ currentBuild.description = "aaa<br>bbb<br>ccc" } } } <br> を使用する 参考サイト様

【Unity】Addressables で Android において StreamingAssets から読み込んだアセットバンドルがキャッシュに保存されない現象に関するメモ

検証環境 Addressables 1.16.19 概要 Addressable を使用しているプロジェクトで Android ビルドして StreamingAssets からアセットバンドルを読み込んだ時に そのアセットバンドルがキャッシュに保存されない現象に遭遇した Addressable の AssetBundleProv…

【Unity】Addressables で通信環境が悪い状態でサーバからアセットバンドルのダウンロードに失敗した時に内部で例外が出ないようにする方法

検証環境 Addressables 1.16.19 概要 Exception: Attempting to use an invalid operation handle UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_InternalOp () (at Runtime/ResourceManager/AsyncOperations/AsyncOperationHan…

【Unity】AndroidJavaException: java.lang.ClassNotFoundException: android.support.customtabs.CustomTabsIntent$Builder

概要 AndroidJavaException: java.lang.ClassNotFoundException: android.support.customtabs.CustomTabsIntent$Builder Android 実機で Chrome Custom Tabs を開こうとしたら 上記の例外が発生する状態に遭遇した 以下のページの次の手順を行わないようにし…

【Jenkins】WorkflowScript: XX: Duplicate stage name: "YYYY" @ line XX, column ZZ.

概要 WorkflowScript: XX: Duplicate stage name: "YYYY" @ line XX, column ZZ. 同名の stage が複数存在する場合に発生するエラー

【Unity】BetterStreamingAssets: file XXXX is where Streaming Assets are put, but is compressed.

概要 BetterStreamingAssets: file XXXX is where Streaming Assets are put, but is compressed. If this is a App Bundle build, see README for a possible workaround. If this file is not a Streaming Asset (has been on purpose by hand or by anoth…

【Unity】Addressables でリモートカタログを更新する時にメインスレッドが止まらないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables で管理しているグループが多いと、 Addressables.UpdateCatalogs の処理に時間がかかるようになり、 メインスレッドが止まってしまう 重たい処理は UpdateCatalogsOperation.Execute 関数なので この部分を…

【Unity】Cannot instantiate objects with a parent which is persistent. New object will be created without a parent.

概要 using UnityEngine; public class Example : MonoBehaviour { public GameObject m_prefab; private void Awake() { Instantiate ( original: m_prefab, parent: m_prefab.transform // ★ ); } } 新しいゲームオブジェクトをスクリプトから生成する時に…

【Unity】ld: framework not found AdServices

概要 ld: framework not found AdServices Unity で iOS ビルドする時に AdServices.framework を Xcode プロジェクトに追加してからビルドしたら、 上記のエラーが出てビルドに失敗する現象に遭遇した 使用している Xcode のバージョンを 12.2 から 12.4 に…

【Unity】Addressables でローカルカタログを圧縮する場合にビルドログがアプリに含まれないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables でローカルカタログを圧縮する設定を有効化して アセットバンドルをビルドするようにしたところ、 「buildlogtep.json」というビルドログのファイルが アプリビルド時にアプリに含まれるようになってしまっ…

【Unity】Addressables で通信環境が悪い状態でサーバからアセットバンドルのダウンロードに失敗した時に内部で例外が出ないようにする方法

検証環境 Addressables 1.16.19 概要 Exception: Attempting to use an invalid operation handle UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_InternalOp () (at Runtime/ResourceManager/AsyncOperations/AsyncOperationHan…

【Unity】Addressables の Asset Group の Inspector で Advanced Options を常に開いた状態にしたい場合

検証環境 Addressables 1.16.19 概要 Addressable Asset Group の Inspector で Advanced Options は デフォルトが閉じた状態なので、各グループの Advanced Options を見たい場合に 毎回 Advanced Options の ▶ をクリックして開く必要がある BundleAssetGr…

【Unity】Addressables で Basic 認証が設定されたサーバからリモートカタログをダウンロードする方法

検証環境 Addressables 1.16.19 概要 Addressables はデフォルトでは Basic 認証が設定されたサーバから リモートカタログをダウンロードすることができない TextDataProvider.Start 関数で UnityWebRequest を使用して リモートカタログのダウンロードが実…

【Unity】Addressables でストレージの空き容量が不足している時にリモートカタログをダウンロードしても正常に動作するように

検証環境 Addressables 1.16.19 概要 Addressables ではサーバからダウンロードしたリモートカタログを 端末のキャッシュに保存する際に、ストレージの空き容量を確認していない そのため、空き容量が不足していると File.WriteAllText で例外が発生して Con…

【Unity】Addressables の LoadScene でアセットバンドルの読み込みに失敗した時に進行不能にならないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables の LoadScene でシーン遷移する時に 通信環境が悪いなどの理由でアセットバンドルの読み込みに失敗した場合、 SceneProvider で AsyncOperationBase.Complete が呼ばれなくなり それ以降 Addressables の A…

【Unity】Addressables でリモートカタログをキャッシュに保存する時にメインスレッドが止まらないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables で管理しているグループが多いと、 リモートカタログをキャッシュに保存する処理に時間がかかるようになり、 メインスレッドが止まってしまう 重たい処理は ContentCatalogProvider.OnCatalogLoaded 関数で…

【Unity】Addressables のビルドを Jenkins から実行する場合にビルドに失敗しても成功扱いにならないようにする方法

検証環境 Addressables 1.16.19 概要 Jenkins から Addressables のビルドを実行する場合、 アセットバンドルのビルドに失敗しても、 Jenkins 上ではビルドに成功したことになってしまった アセットバンドルをビルドする AddressableAssetSettings.BuildPlay…

【Unity】Addressables でリモートカタログの更新が存在するか確認する時にメインスレッドが止まらないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables で管理しているグループが多いと、 Addressables.CheckForCatalogUpdates の処理に時間がかかるようになり、 メインスレッドが止まってしまう 重たい処理は CheckCatalogsOperation.Execute 関数なので こ…

【Unity】Addressables でカタログの JSON を読み込む時にメインスレッドが止まらないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables で管理しているグループが多いと、 カタログの JSON のサイズが大きくなり、 カタログの読み込みに時間がかかるようになり、メインスレッドが止まってしまう カタログは JSONAssetProvider クラスで JsonUt…

【Unity】Uncaught (in promise) Your browser does not support WebGL.

概要 Uncaught (in promise) Your browser does not support WebGL. Unity で WebGL ビルドしたゲームを起動したところ 真っ黒な画面のままゲームが表示されない現象に遭遇した Chrome の Console を見てみると上記のエラーが表示されていた Chrome を再起動…