コガネブログ

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

2022-01-13から1日間の記事一覧

【Rider】複数ファイル内検索で Unity の .meta ファイルも検索対象にする方法

概要 複数ファイル内検索で「ファイルマスク」をチェックして *.meta と入力し、 さらに「Include non-solution items」をチェックした状態で検索すると Unity の .meta ファイル内も検索することができます

【Unity】Addressables を導入しているプロジェクトでビルドすると定期的に数 KB の GC Alloc が発生する場合

概要 Addressables を導入しているプロジェクトからゲームをビルドして Profiler を見た時に 「DiagnosticEventCollectorSingleton.Update()」というプロセスで 1.2 KB の GC Alloc が定期的に発生している場合 AddressableAssetSettings の「Send Profiler …

【Unity】Addressables を導入しているプロジェクトで再生に時間がかかる場合は AssetReference が原因の可能性がある

概要 Addressables 1.18.16 あたりから AssetReference のコンストラクタで /// <summary> /// Construct a new AssetReference object. /// </summary> public AssetReference() { #if UNITY_EDITOR EditorApplication.playModeStateChanged -= ReleaseHandleWhenPlaymodeState…

【Unity】Addressables のビルド時間の内訳を Chrome で確認する方法

概要 Chrome を開いてアドレスバーに chrome://tracing と入力します Load ボタンを押して Unity プロジェクトのフォルダに存在する Library/com.unity.addressables/AddressablesBuildTEP.json を選択します これで Addressables のビルド時間の内訳を Chro…

【Unity】Addressables でビルドした時にビルド結果の詳細を出力する方法

概要 Unity の Preferences を開いて左メニューで「Addressables」を選択して 「Debug Build Layout」をオンにした状態で Addressables でビルドすると ビルド結果の詳細が Library/com.unity.addressables/ フォルダに buildlayout.txt というファイルで出…