うにてぃブログ

主にUnityとC#に関する記事を書いていきます

2023-09-01から1ヶ月間の記事一覧

【Unity】アセットのタイプに応じたアイコンの取得方法

Unityでは、アセットのアイコンを取得するために AssetDatabase.GetCachedIcon を利用できます。ただし、このメソッドを使用するにはアセットのパスが必要です。アセットのタイプだけでアイコンを取得したい場合、以下のような処理を利用することができます…

【エラー】 UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Location found for Key=GUID

UnityEngine.AddressableAssets.AssetReference を利用している際に UnityEditor 上では動作したがビルドして確認してみると以下のエラーでロードできなかった UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.Addressa…