コガネブログ

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

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

【Unity】ForcedScopedThreadAttach can only be used from threads that are not already attached.

概要 ForcedScopedThreadAttach can only be used from threads that are not already attached. Unity エディタでアセットバンドルを使用して動作確認している時に UnityWebRequest.SendWebRequest を実行したら 上記のエラーが出るようになった Unity エデ…

【Unity】error CS2011: Error opening response file '/XXXX/Temp/UnityTempFile-YYYY'

概要 -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved. error C…

【Unity】Exception: /Applications/Unity/Hub/Editor/XXXX/Unity.app/Contents/il2cpp/build/deploy/il2cppcore/il2cppcore.dll did not run properly!

概要 Exception: /Applications/Unity/Hub/Editor/XXXX/Unity.app/Contents/il2cpp/build/deploy/il2cppcore/il2cppcore.dll did not run properly! Android IL2CPP ビルドに常に失敗する現象に遭遇した Development Build と Script Debugging をオフにした…

【Unity】Exception in thread "main" com.android.apksig.apk.MinSdkVersionException:

概要 Exception in thread "main" com.android.apksig.apk.MinSdkVersionException: Failed to determine APK's minimum supported platform version. Use --min-sdk-version to override Android ビルドした ROM に対して apksigner を実行したら 上記のエ…

【Unity】IOException: Write fault on path /XXXX/[Unknown]

概要 IOException: Write fault on path /XXXX/[Unknown] at System.IO.FileStream.WriteInternal (System.Byte[] src, System.Int32 offset, System.Int32 count) [0x00077] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.IO.FileStream.Write (System.Byte[] array, System.Int32 offse</eae584ce26bc40229c1b1aa476bfa589>…

【Unity】Play Asset Delivery のビルドで「Signing bundle...」が終わらない場合

概要 // Only sign the .aab if a custom keystore is configured. if (_jarSigner.UseCustomKeystore) { DisplayProgress("Signing bundle", 0.9f); var signingErrorMessage = _jarSigner.Sign(aabFilePath); if (signingErrorMessage != null) { DisplayB…

【Unity】Exception failed: System.Threading.ThreadAbortException

概要 Exception failed: System.Threading.ThreadAbortException at (wrapper managed-to-native) System.Threading.WaitHandle.Wait_internal(intptr*,int,bool,int) at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHa…

【Unity】[BT:1.5.0] Error: null

概要 bundletool failed: Failed to run 'XXXX/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -jar "YYYY\Assets\GooglePlayPlugins\com.google.android.appbundle\Editor\Tools\bundletool-all.jar" build-bundle --overwrite --config=…

【Unity】.aab を端末にインストールするバッチファイル

概要 上記の aab_install.bat を保存する .aab をダブルクリックした時にこの .bat を実行するように設定変更する これで .aab をダブルクリックしたら端末にインストールできるようになる BUNDLETOOL のパスは必要に応じて変更する bundletool のダウンロー…

【Unity】Failed to retrieve asset pack: No APKs available for pack 'XXXX'.

概要 Failed to retrieve asset pack: No APKs available for pack 'XXXX'. Play Asset Delivery の Asset Pack を読み込む時に 上記のエラーが発生する現象に遭遇した Bundletool.BuildBundle( buildPlayerOptions ); Bundletool.BuildBundle を実行する時…

【Unity】ArgumentException: Invalid asset pack name: XXXX

概要 ArgumentException: Invalid asset pack name: XXXX AssetPackConfig.AddAssetBundle したところ上記のエラーが発生した Play Asset Delivery でアセットバンドルから Asset Pack を作成する時は アセットバンドルのファイル名を英数字もしくは _ のみ…

【Unity】Failed to retrieve asset pack: Asset Pack Download Error(-1):

概要 Failed to retrieve asset pack: Asset Pack Download Error(-1): The requesting app is unavailable (e.g. unpublished, nonexistent version code). (https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/Asset…

【Unity】[BT:0.10.3] Error: Unrecognized flags: --local-testing

概要 java -Xmx1G -jar "C:\Program Files\Unity\Hub\Editor\2019.4.22f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bundletool-all-0.10.3.jar" build-apks --bundle=XXXX.aab --output=YYYY.apks --local-testing INFO: The APKs will be signed w…

【Unity】[BT:0.10.3] Error: Installation of the app failed.

概要 The APKs have been extracted in the directory: XXXX 04:12:16 E/SplitApkInstaller: Failed to finalize session : Unknown failure (cmd: Failure calling service package: Broken pipe (32)) [BT:0.10.3] Error: Installation of the app failed.…

【Unity】ArgumentException: Asset 'Assets/__DELETED_GUID_Trash/XXXX' is not a valid Asset or Scene.

概要 ArgumentException: Asset 'Assets/__DELETED_GUID_Trash/XXXX' is not a valid Asset or Scene. Addressable でアセットバンドルをビルドする時に 上記のエラーが発生してビルドに失敗する現象に遭遇した Unity を再起動してからアセットバンドルをビ…

【Unity】[BT:0.10.3] Error: java.lang.OutOfMemoryError: Java heap space

概要 [BT:0.10.3] Error: java.lang.OutOfMemoryError: Java heap space java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space at com.android.tools.build.bundletool.io.ConcurrencyUtils.waitFor(ConcurrencyUtils.java:59) at com.…

【Unity】java.io.IOException: Unable to delete file: XXXX\Temp\gradleOut\launcher\build\intermediates\metadata_library_dependencies_report\release\dependencies.pb

概要 java.io.IOException: Unable to delete file: XXXX\Temp\gradleOut\launcher\build\intermediates\metadata_library_dependencies_report\release\dependencies.pb Unity で Android ビルドしたら上記のエラーが発生することがあった 再度ビルドしたら…

【Unity】Broken text PPtr in file(XXXX.unity). Local file identifier (YYYY) doesn't exist!

概要 Broken text PPtr in file(XXXX.unity). Local file identifier (YYYY) doesn't exist! Addressable でアセットバンドルをビルドする時に 上記のエラーが発生する現象に遭遇した 該当のシーンファイルのフォーマットが バージョンアップ前の Unity のも…

【Unity】Mac mini (M1, 2020) に移行したらアセットバンドルと ROM のビルド時間が長くなったのでメモ

スペック 項目 内容 移行前 MacBook Pro (13-inch, 2019, Thunderbolt 3ポートx 4) 移行後 Mac mini (M1, 2020) Unity 2019.4 ビルド時間検証 項目 時間 Android アセットバンドルビルド 1.9 倍 iOS アセットバンドルビルド 2.1 倍 Android ROM ビルド 2.4 …

【Mac】The framework 'Microsoft.NETCore.App', version '2.1.0' was not found.

概要 It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '2.1.0' was not found. - The following frameworks were found: 3.1.13 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]…

【Mac】dotnet: command not found

概要 dotnet: command not found 以下のページで使用したい .NET Core のバージョンを選択する https://dotnet.microsoft.com/download/dotnet 「.NET Runtime」の項目で該当 OS のインストーラを選択して インストーラをダウンロードし、実行する

【Mac】mkdir: /usr/local/bin: Permission denied

概要 mkdir: /usr/local/bin: Permission denied ./install.sh で Mac に Git LFS をインストールしようとしたら上記のエラーが発生した sudo ./install.sh で正常にインストールできた 関連記事

【Jenkins】jnlpjars/remoting.jarをロードできません

概要 jnlpjars/remoting.jarをロードできません Mac にインストールした Jenkins でスレーブを起動しようとしたら 上記のエラーが発生する現象に遭遇した 「Jenkinsの管理 > システムの設定 > Jenkinsの位置 > jenkins URL」を http://【Mac のコンピュータ…

【Xcode】cp: /Users/XXXX/Library/MobileDevice/Provisioning Profiles/YYYY.mobileprovision: No such file or directory

概要 cp: /Users/XXXX/Library/MobileDevice/Provisioning Profiles/YYYY.mobileprovision: No such file or directory 新しく購入した Mac で Jenkins のジョブをビルドして Xcode ビルドする際に、.mobileprovision を Library/MobileDevice/Provisioning …

【Unity】Failed to resolve packages: Failed to add editor bundled package

概要 Failed to resolve packages: Failed to add editor bundled package [/Applications/Unity/Hub/Editor/XXXX/Unity.app/Contents/Resources/PackageManager/Editor/com.unity.xr.arsubsystems-2.1.2.tgz] to the package cache: ENOTEMPTY: directory n…

【Xcode】Code Signing Error: Provisioning profile "XXXX" doesn't include the currently selected device "YYYY" (identifier ZZZZ).

概要 Code Signing Error: Provisioning profile "XXXX" doesn't include the currently selected device "YYYY" (identifier ZZZZ). Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 14.2' Code Signing Error: …

【Unity】オブジェクトの参照が Missing Reference になっているかどうかを確認できるクラス「UniMissingReferenceUtils」を GitHub に公開しました

リポジトリ 使い方 using Kogane; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var gameObject = Selection.activeGameObject; var hasMissingReference = MissingRefer…