コガネブログ

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

【Unity】エディタの UI のサイズを拡大する方法

概要 Unity メニューの「Edit > Preferences...」を押して 「UI Scaling」を選択して「Use default desktop setting」をオフにして 「Use custom scaling value」で任意の文字サイズを選択して Unity エディタを再起動すると UI のサイズを拡大できます(画…

【Unity】Addressable Asset System で無効なファイルや Unity がサポートしていないファイルを無視する方法

概要 1.17.0 以降の Addressable Asset System なら AddressableAssetSettings の「Ignore Invalid/Unsupported Files in Build」をオンにすると 無効なファイルや Unity がサポートしていないファイルを無視できる

【Unity】Addressable Asset System でカタログのサイズを減らす方法

概要 1.16.10 以降の Addressable Asset System なら AddressableAssetSettings の「Optimize Catalog Size」をオンにすると カタログのサイズを減らせる

【Unity】Addressable Asset System でアセットバンドルの読み込み速度を改善する方法

概要 1.13.1 以降の Addressable Asset System なら AddressableAssetSettings の「Contiguous Bundles」をオンにすると アセットバンドルの読み込み速度を改善できるらしい Added AddressableAssetSettings.ContiguousBundles option, which when enabled w…

Unity1Week お題「2」でアクションパズルゲーム「ムーブロック」を公開しました!

ゲームはこちら https://unityroom.com/games/moveblock ブロックを押せるゴーストと2人で協力してゴールを目指すアクションパズルゲーム「ムーブロック」を公開しました!(全40ステージ)https://t.co/bSJZ1wLYKR#unity1week #unityroom pic.twitter.com/d…

【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 を実行する時…